MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_load_initial_conftest_last_ordering

Function test_load_initial_conftest_last_ordering

testing/test_config.py:1257–1281  ·  view source on GitHub ↗
(_config_for_test)

Source from the content-addressed store, hash-verified

1255
1256
1257def test_load_initial_conftest_last_ordering(_config_for_test):
1258 pm = _config_for_test.pluginmanager
1259
1260 class My:
1261 def pytest_load_initial_conftests(self):
1262 pass
1263
1264 m = My()
1265 pm.register(m)
1266 hc = pm.hook.pytest_load_initial_conftests
1267 hookimpls = [
1268 (
1269 hookimpl.function.__module__,
1270 "wrapper" if hookimpl.hookwrapper else "nonwrapper",
1271 )
1272 for hookimpl in hc.get_hookimpls()
1273 ]
1274 assert hookimpls == [
1275 ("_pytest.config", "nonwrapper"),
1276 (m.__module__, "nonwrapper"),
1277 ("_pytest.legacypath", "nonwrapper"),
1278 ("_pytest.pythonpath", "nonwrapper"),
1279 ("_pytest.capture", "wrapper"),
1280 ("_pytest.warnings", "wrapper"),
1281 ]
1282
1283
1284def test_get_plugin_specs_as_list() -> None:

Callers

nothing calls this directly

Calls 2

MyClass · 0.85
registerMethod · 0.80

Tested by

no test coverage detected