-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
33 lines (24 loc) · 816 Bytes
/
Copy pathconftest.py
File metadata and controls
33 lines (24 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""Root pytest configuration for the public repo layout."""
import sys
from pathlib import Path
import pytest
ROOT = Path(__file__).resolve().parent
PACKAGE_DIR = ROOT / "Pagonic"
for path in (ROOT, PACKAGE_DIR):
path_text = str(path)
if path_text not in sys.path:
sys.path.insert(0, path_text)
def pytest_addoption(parser):
parser.addoption(
"--comprehensive",
action="store_true",
default=False,
help="Run comprehensive manual tests",
)
def pytest_collection_modifyitems(config, items):
if config.getoption("--comprehensive"):
return
skip_comprehensive = pytest.mark.skip(reason="need --comprehensive option to run")
for item in items:
if "comprehensive" in item.keywords:
item.add_marker(skip_comprehensive)