-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
24 lines (19 loc) · 835 Bytes
/
Copy pathconftest.py
File metadata and controls
24 lines (19 loc) · 835 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
"""Shared pytest configuration and fixtures."""
from __future__ import annotations
SERVERS = {
"dev": ("http://192.168.50.61:3001", "ws://192.168.50.61:3001/feed"),
"prod": ("https://api.mackinac.io", "wss://api.mackinac.io/feed"),
}
def pytest_addoption(parser: object) -> None:
parser.addoption( # type: ignore[attr-defined]
"--server",
default="dev",
choices=list(SERVERS),
help="Live-test target: 'dev' (192.168.50.61) or 'prod' (api.mackinac.io)",
)
def pytest_configure(config: object) -> None: # type: ignore[override]
"""Register the 'live' marker so -m live works without warnings."""
config.addinivalue_line( # type: ignore[attr-defined]
"markers",
"live: integration tests that require a live Mackinac server (run with -m live)",
)