mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
More robust re-ordering of tests
This commit is contained in:
parent
b968df2033
commit
fd8d377a34
1 changed files with 3 additions and 2 deletions
|
|
@ -12,5 +12,6 @@ def pytest_unconfigure(config):
|
||||||
|
|
||||||
def pytest_collection_modifyitems(items):
|
def pytest_collection_modifyitems(items):
|
||||||
# Ensure test_black.py runs first before any asyncio code kicks in
|
# Ensure test_black.py runs first before any asyncio code kicks in
|
||||||
test_black = [fn for fn in items if fn.name == "test_black"][0]
|
test_black = [fn for fn in items if fn.name == "test_black"]
|
||||||
items.insert(0, items.pop(items.index(test_black)))
|
if test_black:
|
||||||
|
items.insert(0, items.pop(items.index(test_black[0])))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue