fedora-python / fedora-python/tox-current-env
Running `tox-current-env` tests with `--current-env` fails
- 主要言語
- Python
- スター
- 26
- フォーク
- 9
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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) =============
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
tests/test_integration_tox4.py から始め、特にネイティブ tox 環境とその TOX_WORK_DIR の処理に関するテストを確認します。--current-env の実行を再現し、テスト環境から TOX_WORK_DIR を削除した後の報告された実行結果と比較します。統合スイートで .tox/py39/bin/python がないことによる失敗が報告されなくなり、指定されたテスト数を通過すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- testing-qa, tooling
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100