diff --git a/tests/test_ordering.py b/tests/test_ordering.py index dd703ab..22b47b0 100644 --- a/tests/test_ordering.py +++ b/tests/test_ordering.py @@ -12,9 +12,9 @@ def item_names_for(testdir): def _item_names_for(tests_content): # some strange code to extract sorted items items = testdir.getitems(tests_content) - hook = testdir.config.hook + hook = items[0].config.hook hook.pytest_collection_modifyitems(session=items[0].session, - config=testdir.config, items=items) + config=items[0].config, items=items) return [item.name for item in items] return _item_names_for