blob: e9aeac36c6e5e41b6a949b9bb4d1bb5c0fdc9b7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from __future__ import annotations
from pathlib import Path
from typing import Any, Sequence
HERE = Path(__file__).parent
def pytest_collection_modifyitems(items: Sequence[Any]) -> None:
"""automatically apply plugin test to all the test in this suite"""
root = str(HERE)
for item in items:
if item.module.__file__.startswith(root):
item.add_marker("plugin_test")
|