tox icon indicating copy to clipboard operation
tox copied to clipboard

test_replace_env_var_circular_flip_flop failing

Open mcepl opened this issue 1 year ago • 1 comments

Issue

When packaging tox 4.5.1 from the PyPI tarball for openSUSE/Factory, test_replace_env_var_circular_flip_flop fails (among other problems, see complete build log.txt):

[   74s] =================================== FAILURES ===================================
[   74s] ___________________ test_replace_env_var_circular_flip_flop ____________________
[   74s] [gw0] linux -- Python 3.9.16 /home/abuild/rpmbuild/BUILD/tox-4.5.1/testenv-3.9/bin/python
[   74s] 
[   74s] replace_one = <function replace_one.<locals>.example at 0x7fc8b3f53550>
[   74s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc8c0249460>
[   74s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7fc8c08fbd00>
[   74s] 
[   74s]     @pytest.mark.usefixtures("reset_env_var_after_delay")
[   74s]     def test_replace_env_var_circular_flip_flop(
[   74s]         replace_one: ReplaceOne,
[   74s]         monkeypatch: MonkeyPatch,
[   74s]         caplog: LogCaptureFixture,
[   74s]     ) -> None:
[   74s]         """Replacement values will not infinitely loop back and forth"""
[   74s]         monkeypatch.setenv("TRAGIC", "{env:MAGIC}")
[   74s]         monkeypatch.setenv("MAGIC", "{env:TRAGIC}")
[   74s]         result = replace_one("{env:MAGIC}")
[   74s]         assert result == "{env:MAGIC}"
[   74s] >       assert "circular chain between set env MAGIC, TRAGIC" in caplog.messages
[   74s] E       AssertionError: assert 'circular chain between set env MAGIC, TRAGIC' in []
[   74s] E        +  where [] = <_pytest.logging.LogCaptureFixture object at 0x7fc8c08fbd00>.messages
[   74s] 
[   74s] caplog     = <_pytest.logging.LogCaptureFixture object at 0x7fc8c08fbd00>
[   74s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc8c0249460>
[   74s] replace_one = <function replace_one.<locals>.example at 0x7fc8b3f53550>
[   74s] result     = '{env:MAGIC}'
[   74s] 
[   74s] tests/config/loader/ini/replace/test_replace_env_var.py:124: AssertionError
[   74s] __________________ test_replace_env_var_circular_flip_flop_5 ___________________
[   74s] [gw0] linux -- Python 3.9.16 /home/abuild/rpmbuild/BUILD/tox-4.5.1/testenv-3.9/bin/python
[   74s] 
[   74s] replace_one = <function replace_one.<locals>.example at 0x7fc8b348d670>
[   74s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc8c06e17f0>
[   74s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7fc8c032a340>
[   74s] 
[   74s]     @pytest.mark.usefixtures("reset_env_var_after_delay")
[   74s]     def test_replace_env_var_circular_flip_flop_5(
[   74s]         replace_one: ReplaceOne,
[   74s]         monkeypatch: MonkeyPatch,
[   74s]         caplog: LogCaptureFixture,
[   74s]     ) -> None:
[   74s]         """Replacement values will not infinitely loop back and forth (longer chain)"""
[   74s]         monkeypatch.setenv("MAGIC", "{env:TRAGIC}")
[   74s]         monkeypatch.setenv("TRAGIC", "{env:RABBIT}")
[   74s]         monkeypatch.setenv("RABBIT", "{env:HAT}")
[   74s]         monkeypatch.setenv("HAT", "{env:TRICK}")
[   74s]         monkeypatch.setenv("TRICK", "{env:MAGIC}")
[   74s]         result = replace_one("{env:MAGIC}")
[   74s]         assert result == "{env:MAGIC}"
[   74s] >       assert "circular chain between set env MAGIC, TRAGIC, RABBIT, HAT, TRICK" in caplog.messages
[   74s] E       AssertionError: assert 'circular chain between set env MAGIC, TRAGIC, RABBIT, HAT, TRICK' in []
[   74s] E        +  where [] = <_pytest.logging.LogCaptureFixture object at 0x7fc8c032a340>.messages
[   74s] 
[   74s] caplog     = <_pytest.logging.LogCaptureFixture object at 0x7fc8c032a340>
[   74s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc8c06e17f0>
[   74s] replace_one = <function replace_one.<locals>.example at 0x7fc8b348d670>
[   74s] result     = '{env:MAGIC}'
[   74s] 
[   74s] tests/config/loader/ini/replace/test_replace_env_var.py:141: AssertionError
[   74s] =========================== short test summary info ============================
[   74s] SKIPPED [1] tests/test_provision.py:162: integration tests not run (no --run-integration flag)
[   74s] SKIPPED [1] tests/test_provision.py:219: integration tests not run (no --run-integration flag)
[   74s] SKIPPED [2] tests/test_provision.py:228: integration tests not run (no --run-integration flag)
[   74s] SKIPPED [2] tests/test_provision.py:196: integration tests not run (no --run-integration flag)
[   74s] SKIPPED [1] tests/test_provision.py:129: integration tests not run (no --run-integration flag)
[   74s] SKIPPED [1] tests/tox_env/python/virtual_env/test_setuptools.py:16: integration tests not run (no --run-integration flag)
[   74s] SKIPPED [1] tests/session/cmd/test_sequential.py:158: integration tests not run (no --run-integration flag)
[   74s] SKIPPED [1] tests/session/cmd/test_sequential.py:57: integration tests not run (no --run-integration flag)
[   74s] SKIPPED [1] tests/session/cmd/test_devenv.py:15: integration tests not run (no --run-integration flag)
[   74s] FAILED tests/config/loader/ini/replace/test_replace_env_var.py::test_replace_env_var_circular_flip_flop
[   74s] FAILED tests/config/loader/ini/replace/test_replace_env_var.py::test_replace_env_var_circular_flip_flop_5
[   74s] ================= 2 failed, 1609 passed, 11 skipped in 55.71s ==================

Environment

Provide at least:

  • OS: openSUSE/Tumbleweed
  • pip list of the host Python where tox is installed (see above log for the list), but it is also pip-list.txt.

Output of running tox

Provide the output of tox -rvv:

see above

Minimal example

Just running the test suite (see above in the build log for details).

mcepl avatar May 10 '23 16:05 mcepl