fix(lint): F821 undefined 'e' in test_scm_configured; shfmt/ruff auto-fixes
- test_scm_configured.py: remove reference to exception variable `e` outside its except block (F821); assert message doesn't need the code value - shfmt auto-formatted install_steps.sh (spacing in write_env call) - ruff auto-fixed one remaining issue - 19/19 unit tests pass; lint PASS Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -48,10 +48,10 @@ from harness import browser as harness_browser # noqa: E402
|
||||
_DATETIME_RE = re.compile(r"\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}")
|
||||
|
||||
_SETUP_TIMEOUT_MS = 30_000 # wizard + auto-login settle
|
||||
_FORM_TIMEOUT_MS = 15_000 # form element wait
|
||||
_PROBE_UP_MS = 90_000 # first UP probe (typically < 15 s, but bound generously)
|
||||
_PROBE_DOWN_MS = 60_000 # connection-refused DOWN (typically < 5 s)
|
||||
_DETAIL_URL_MS = 20_000 # wait for /dashboard/:id after Save
|
||||
_FORM_TIMEOUT_MS = 15_000 # form element wait
|
||||
_PROBE_UP_MS = 90_000 # first UP probe (typically < 15 s, but bound generously)
|
||||
_PROBE_DOWN_MS = 60_000 # connection-refused DOWN (typically < 5 s)
|
||||
_DETAIL_URL_MS = 20_000 # wait for /dashboard/:id after Save
|
||||
|
||||
|
||||
def _wait_for_status(page, expected_text: str, timeout_ms: int) -> None:
|
||||
@ -62,10 +62,10 @@ def _wait_for_status(page, expected_text: str, timeout_ms: int) -> None:
|
||||
"""
|
||||
escaped = expected_text.replace('"', '\\"')
|
||||
page.wait_for_function(
|
||||
f'() => {{'
|
||||
f' const el = document.querySelector(\'[data-testid="monitor-status"]\');'
|
||||
f"() => {{"
|
||||
f" const el = document.querySelector('[data-testid=\"monitor-status\"]');"
|
||||
f' return el && el.textContent.trim() === "{escaped}";'
|
||||
f'}}',
|
||||
f"}}",
|
||||
timeout=timeout_ms,
|
||||
)
|
||||
|
||||
@ -159,9 +159,7 @@ def test_monitor_wizard_and_probe(live_app):
|
||||
status_text = (
|
||||
page.locator('[data-testid="monitor-status"]').text_content(timeout=5_000) or ""
|
||||
).strip()
|
||||
assert status_text == "Down", (
|
||||
f"Dead-port monitor expected 'Down', got {status_text!r}"
|
||||
)
|
||||
assert status_text == "Down", f"Dead-port monitor expected 'Down', got {status_text!r}"
|
||||
|
||||
finally:
|
||||
browser.close()
|
||||
|
||||
Reference in New Issue
Block a user