Skip to content

Commit

Permalink
Don't use accidental pytest API, fix tests for pytest 6.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
hroncok committed Jan 26, 2021
1 parent 492697e commit 9bfb057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_ordering.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9bfb057

Please sign in to comment.