Skip to content

Running tox-current-env tests with --current-env fails #79

@mtelka

Description

@mtelka

When I run tox-current-env tests with --current-env then I see many tests to fail:

=========================== short test summary info ============================
FAILED tests/test_integration_tox4.py::test_recreate_environment[--print-deps-to=-] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_self_is_not_installed[True---print-extras-to=-] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_self_is_not_installed[True---current-env] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_self_is_not_installed[False---print-deps-to=-] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_recreate_environment[--current-env] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_self_is_not_installed[False---current-env] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_self_is_not_installed[False---print-extras-to=-] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_self_is_installed_with_regular_tox[False] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_self_is_installed_with_regular_tox[True] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_passenv[None] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_passenv[different list] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_passenv[__var] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_passenv[*] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_self_is_not_installed[True---print-deps-to=-] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_pass_env[None] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_pass_env[*] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_pass_env[different\nlist] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_pass_env[__var] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_report_installed - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
FAILED tests/test_integration_tox4.py::test_regular_run_native_toxenv - subprocess.CalledProcessError: Command '('/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python', '-m', 'tox', '-q', '-e', 'py39')' returned non-zero exit status 255.
FAILED tests/test_integration_tox4.py::test_print_deps_without_python_command[--print-deps-to-file=-] - FileNotFoundError: [Errno 2] No such file or directory: '/data/builds/oi-userland/components/python/tox-current-env/build/amd64-3.9/.tox/py39/bin/python'
======= 21 failed, 164 passed, 2 skipped, 1 xfailed in 84.83s (0:01:24) ========

I found that when I do this:

--- tox-current-env-0.0.12/tests/test_integration_tox4.py.orig
+++ tox-current-env-0.0.12/tests/test_integration_tox4.py
@@ -347,6 +347,7 @@
     tox_path = shutil.which("tox")
     tox_link.symlink_to(tox_path)
     env = {**os.environ, "PATH": str(bin)}
+    del env["TOX_WORK_DIR"]
 
     result = tox("-e", NATIVE_TOXENV, print_deps_stdout_arg, env=env)
     expected = textwrap.dedent(

then all tests pass:

============ 185 passed, 2 skipped, 1 xfailed in 103.86s (0:01:43) =============

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions