REALLY make sure generated test order is stable
This really does what f87ac17506
should
have done and fixes the horrible bug introduced by that commit.
This commit is contained in:
parent
da30ce29bb
commit
680ba0969e
1 changed files with 3 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
|||
# Copyright (C) 2015-2022 Tobias Gruetzmacher
|
||||
import re
|
||||
import os
|
||||
from operator import attrgetter
|
||||
|
||||
import pytest
|
||||
from xdist.dsession import LoadScopeScheduling
|
||||
|
@ -39,9 +40,8 @@ def get_test_scrapers():
|
|||
|
||||
def pytest_generate_tests(metafunc):
|
||||
if 'scraperobj' in metafunc.fixturenames:
|
||||
scrapers = get_test_scrapers()
|
||||
scraperids = [x.name for x in scrapers]
|
||||
metafunc.parametrize('scraperobj', scrapers, ids=sorted(scraperids))
|
||||
scrapers = sorted(get_test_scrapers(), key=attrgetter('name'))
|
||||
metafunc.parametrize('scraperobj', scrapers, ids=attrgetter('name'))
|
||||
|
||||
|
||||
class LoadModScheduling(LoadScopeScheduling):
|
||||
|
|
Loading…
Reference in a new issue