Skip to content

Commit

Permalink
fix: sort collected tests by test name
Browse files Browse the repository at this point in the history
  • Loading branch information
lgpage committed Mar 16, 2024
1 parent 85642a9 commit a6cc39a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pytest_cython/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def collect(self):
del tests[test_name]
tests[equiv_test_name].lineno = lineno

for test in tests.values():
for test in sorted(tests.values(), key=lambda x: x.name):
if test.examples: # skip empty doctests
if hasattr(DoctestItem, 'from_parent'):
yield DoctestItem.from_parent(self, name=test.name, runner=runner, dtest=test)
Expand Down

0 comments on commit a6cc39a

Please sign in to comment.