13 lines
336 B
Python
13 lines
336 B
Python
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
|
|
def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
|
|
for item in items:
|
|
parts = Path(item.path).parts
|
|
if "unit" in parts:
|
|
item.add_marker(pytest.mark.unit)
|
|
elif "integration" in parts:
|
|
item.add_marker(pytest.mark.integration)
|