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.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
"""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).",
|
||||
)
|
||||
Reference in New Issue
Block a user