Merge pull request #9512 from bluetech/pluggy-private
testing: avoid private pluggy attributes in test
(cherry picked from commit a6310c20c1
)
This commit is contained in:
parent
cca9b90905
commit
2a22b81240
|
@ -1247,9 +1247,19 @@ def test_load_initial_conftest_last_ordering(_config_for_test):
|
||||||
m = My()
|
m = My()
|
||||||
pm.register(m)
|
pm.register(m)
|
||||||
hc = pm.hook.pytest_load_initial_conftests
|
hc = pm.hook.pytest_load_initial_conftests
|
||||||
values = hc._nonwrappers + hc._wrappers
|
hookimpls = [
|
||||||
expected = ["_pytest.config", m.__module__, "_pytest.capture", "_pytest.warnings"]
|
(
|
||||||
assert [x.function.__module__ for x in values] == expected
|
hookimpl.function.__module__,
|
||||||
|
"wrapper" if hookimpl.hookwrapper else "nonwrapper",
|
||||||
|
)
|
||||||
|
for hookimpl in hc.get_hookimpls()
|
||||||
|
]
|
||||||
|
assert hookimpls == [
|
||||||
|
("_pytest.config", "nonwrapper"),
|
||||||
|
(m.__module__, "nonwrapper"),
|
||||||
|
("_pytest.capture", "wrapper"),
|
||||||
|
("_pytest.warnings", "wrapper"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def test_get_plugin_specs_as_list() -> None:
|
def test_get_plugin_specs_as_list() -> None:
|
||||||
|
|
Loading…
Reference in New Issue