Files
shelly-ui/tests/integration/conftest.py
T
jonas 71803418e5 Initial commit: Shelly Manager with Textual CLI, Streamlit UI, and comprehensive .gitignore
Shelly device management app with mDNS/subnet discovery, inventory,
configuration, and mass operations for Gen1/Gen2+ devices.

Includes .gitignore excluding runtime data (device DB, user config),
AI conversation history, build artifacts, and common Python/OS patterns.
2026-03-23 21:51:59 +01:00

36 lines
705 B
Python

"""Integration test configuration."""
from __future__ import annotations
import os
import pytest
def integration_enabled() -> bool:
return os.environ.get("SHELLY_INTEGRATION", "").strip().lower() in (
"1",
"true",
"yes",
"on",
)
def mdns_timeout_sec() -> float:
raw = os.environ.get("SHELLY_MDNS_SECONDS", "6")
try:
return max(2.0, float(raw))
except ValueError:
return 6.0
def subnet_cidr() -> str | None:
c = os.environ.get("SHELLY_SUBNET", "").strip()
return c or None
requires_integration = pytest.mark.skipif(
not integration_enabled(),
reason="Set SHELLY_INTEGRATION=1 to run LAN tests (see README).",
)