forked from TrueCloudLab/frostfs-testlib
[#364] Fixed hook order tests collection
Signed-off-by: Ilyas Niyazov <i.niyazov@yadro.com>
This commit is contained in:
parent
dfb048fe51
commit
3966f65c95
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,9 @@ def pytest_add_frostfs_marker(items: list[pytest.Item]):
|
|||
# pytest hook. Do not rename
|
||||
@pytest.hookimpl(trylast=True)
|
||||
def pytest_collection_modifyitems(items: list[pytest.Item]):
|
||||
# The order of running tests corresponded to the suites
|
||||
items.sort(key=lambda item: item.nodeid)
|
||||
|
||||
# Change order of tests based on @pytest.mark.order(<int>) marker
|
||||
def order(item: pytest.Item) -> int:
|
||||
order_marker = item.get_closest_marker("order")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue