| 1255 | |
| 1256 | |
| 1257 | def 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 | |
| 1284 | def test_get_plugin_specs_as_list() -> None: |