frostfs-testlib/src/frostfs_testlib/hooks.py

13 lines
426 B
Python
Raw Normal View History

import pytest
@pytest.hookimpl
def pytest_collection_modifyitems(items: list[pytest.Item]):
# All tests which reside in frostfs nodeid are granted with frostfs marker, excluding
# nodeid = full path of the test
# 1. plugins
# 2. testlib itself
for item in items:
if "frostfs" in item.nodeid and "plugin" not in item.nodeid and "testlib" not in item.nodeid:
item.add_marker("frostfs")