Add compatibility with pytest >= 7.3.0 (#1117)

Starting in this version, marks are no longer ordered. Sorting by their
names still sorts slow marks to the end of the list of tests.
This commit is contained in:
Theodore Ni
2023-08-24 00:32:03 -07:00
committed by GitHub
parent b72e9b6a0c
commit dc9b44bd14
+1 -1
View File
@@ -19,7 +19,7 @@ empty_mark = Mark('', (), {})
def by_slow_marker(item): def by_slow_marker(item):
return item.get_closest_marker('slow', default=empty_mark) return item.get_closest_marker('slow', default=empty_mark).name
def pytest_collection_modifyitems(items): def pytest_collection_modifyitems(items):