From dc9b44bd1412606199a08794ec9980fe5a6e5dc3 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Thu, 24 Aug 2023 00:32:03 -0700 Subject: [PATCH] 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. --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 4bbc8c0..55eb347 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -19,7 +19,7 @@ empty_mark = Mark('', (), {}) 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):