-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
- a detailed description of the bug or problem you are having
- output of
pip listfrom the virtual environment you are using - pytest and operating system versions
- minimal example if possible
While updating setuptools for NixOS Unstable i noticed two pytest tests breaking. I bisected the breaking to the 60.9.0 version bump of setuptools.
I could see both issues on pytest 6.2.5 and 7.0.1, while running Python 3.9.10.
_____________________________ test_version_verbose _____________________________
pytester = <Pytester PosixPath('/build/pytest-of-nixbld/pytest-0/test_version_verbose0')>
pytestconfig = <_pytest.config.Config object at 0x7ffff6a56580>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7ffff49a6e20>
def test_version_verbose(pytester: Pytester, pytestconfig, monkeypatch) -> None:
monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD")
result = pytester.runpytest("--version", "--version")
assert result.ret == 0
result.stderr.fnmatch_lines([f"*pytest*{pytest.__version__}*imported from*"])
if pytestconfig.pluginmanager.list_plugin_distinfo():
> result.stderr.fnmatch_lines(["*setuptools registered plugins:", "*at*"])
E Failed: nomatch: '*setuptools registered plugins:'
E and: 'This is pytest version 6.2.5, imported from /nix/store/npi2r9dqff024h2ks0l8aphpjcrf0by4-python3.9-pytest-6.2.5/lib/python3.9/site-packages/pytest/__init__.py'
E remains unmatched: '*setuptools registered plugins:'
/build/pytest-6.2.5/testing/test_helpconfig.py:12: Failed_______________ TestTerminalFunctional.test_header_trailer_info ________________
self = <test_terminal.TestTerminalFunctional object at 0x7ffff01a4880>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7ffff0de8a90>
pytester = <Pytester PosixPath('/build/pytest-of-nixbld/pytest-0/test_header_trailer_info0')>
request = <FixtureRequest for <Function test_header_trailer_info>>
def test_header_trailer_info(
self, monkeypatch: MonkeyPatch, pytester: Pytester, request
) -> None:
monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD")
pytester.makepyfile(
"""
def test_passes():
pass
"""
)
result = pytester.runpytest()
verinfo = ".".join(map(str, sys.version_info[:3]))
result.stdout.fnmatch_lines(
[
"*===== test session starts ====*",
"platform %s -- Python %s*pytest-%s*py-%s*pluggy-%s"
% (
sys.platform,
verinfo,
pytest.__version__,
py.__version__,
pluggy.__version__,
),
"*test_header_trailer_info.py .*",
"=* 1 passed*in *.[0-9][0-9]s *=",
]
)
if request.config.pluginmanager.list_plugin_distinfo():
> result.stdout.fnmatch_lines(["plugins: *"])
E Failed: nomatch: 'plugins: *'
E and: '============================= test session starts =============================='
E and: 'platform linux -- Python 3.9.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0'
E and: 'rootdir: /build/pytest-of-nixbld/pytest-0/test_header_trailer_info0'
E and: 'collected 1 item'
E and: ''
E and: 'test_header_trailer_info.py . [100%]'
E and: ''
E and: '============================== 1 passed in 0.01s ==============================='
E remains unmatched: 'plugins: *'
/build/pytest-6.2.5/testing/test_terminal.py:816: FailedReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels