Merge pull request #9512 from bluetech/pluggy-private
testing: avoid private pluggy attributes in test
This commit is contained in:
commit
a6310c20c1
|
@ -1264,15 +1264,20 @@ 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
|
||||||
assert [x.function.__module__ for x in hc._nonwrappers] == [
|
hookimpls = [
|
||||||
"_pytest.config",
|
(
|
||||||
m.__module__,
|
hookimpl.function.__module__,
|
||||||
"_pytest.legacypath",
|
"wrapper" if hookimpl.hookwrapper else "nonwrapper",
|
||||||
"_pytest.pythonpath",
|
)
|
||||||
|
for hookimpl in hc.get_hookimpls()
|
||||||
]
|
]
|
||||||
assert [x.function.__module__ for x in hc._wrappers] == [
|
assert hookimpls == [
|
||||||
"_pytest.capture",
|
("_pytest.config", "nonwrapper"),
|
||||||
"_pytest.warnings",
|
(m.__module__, "nonwrapper"),
|
||||||
|
("_pytest.legacypath", "nonwrapper"),
|
||||||
|
("_pytest.pythonpath", "nonwrapper"),
|
||||||
|
("_pytest.capture", "wrapper"),
|
||||||
|
("_pytest.warnings", "wrapper"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue