From 696f955ff8c3345de5090e0aada6e3223f67969f Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 8 Dec 2021 11:49:04 -0300 Subject: [PATCH] Split wrappers and non-wrappers in test_load_initial_conftest_last_ordering Seems better to test which one is which explicitly. --- testing/test_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/test_config.py b/testing/test_config.py index f691d3ed5bb..c8e21a8478a 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -1264,16 +1264,16 @@ def pytest_load_initial_conftests(self): m = My() pm.register(m) hc = pm.hook.pytest_load_initial_conftests - values = hc._nonwrappers + hc._wrappers - expected = [ + assert [x.function.__module__ for x in hc._nonwrappers] == [ "_pytest.config", m.__module__, "_pytest.legacypath", "_pytest.pythonpath", + ] + assert [x.function.__module__ for x in hc._wrappers] == [ "_pytest.capture", "_pytest.warnings", ] - assert [x.function.__module__ for x in values] == expected def test_get_plugin_specs_as_list() -> None: