Test hygiene: empty the flow store between modules, unbind demand on shutdown, poll the hook state in test_flow_ids, count only the watcher under test in the revoked-link test, delete runs.spec's runs
Docs / docs (push) Successful in 1m21s
Playwright Tests / test-playwright (1, 2) (push) Successful in 4m12s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m25s
pre-commit / pre-commit (push) Successful in 3m46s
Test Backend / test-backend (3.12) (push) Successful in 7m57s
Test Backend / test-backend (3.14) (push) Successful in 7m31s
Compose Smoke Test / test-compose (push) Successful in 31s
Playwright Tests / merge-reports (push) Successful in 1m20s
Docs / docs (push) Successful in 1m21s
Playwright Tests / test-playwright (1, 2) (push) Successful in 4m12s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m25s
pre-commit / pre-commit (push) Successful in 3m46s
Test Backend / test-backend (3.12) (push) Successful in 7m57s
Test Backend / test-backend (3.14) (push) Successful in 7m31s
Compose Smoke Test / test-compose (push) Successful in 31s
Playwright Tests / merge-reports (push) Successful in 1m20s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import shutil
|
||||
import uuid
|
||||
from collections.abc import Generator
|
||||
from datetime import UTC, datetime
|
||||
@@ -107,6 +108,19 @@ def _clean_engine_rows() -> Generator[None, None, None]:
|
||||
session.commit()
|
||||
|
||||
|
||||
@pytest.fixture(scope="module", autouse=True)
|
||||
def _clean_flow_store() -> Generator[None, None, None]:
|
||||
"""Start the next module on an empty flow store.
|
||||
|
||||
The store is session-wide like the database, so the flows, dashboards and
|
||||
devices one module left were loaded by the next module's app at startup.
|
||||
Removed whole, its git with it, after the module's app has stopped.
|
||||
"""
|
||||
yield
|
||||
shutil.rmtree(settings.FLOWS_DIR, ignore_errors=True)
|
||||
settings.DEVICES_FILE.unlink(missing_ok=True)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def client() -> Generator[TestClient, None, None]:
|
||||
with TestClient(app) as c:
|
||||
|
||||
Reference in New Issue
Block a user