fix(tests): CI tkinter-tier failures (descriptive filenames, stale notice premise, matplotlib contains) #35

Merged
ykp merged 1 commit from ci-ui-test-fixes into master 2026-09-27 15:39:28 +02:00
Owner

Fixes the 7 CI failures reported after PR #34 merged. All are in the widget tier (tkinter), which is skipped on headless dev machines — none were introduced by #34; they stem from PR #33's output-naming change, ticket 36's notice premise and a matplotlib API drift in the CI image.

Failures → fixes

test_ui_window.py — 4 generate tests (AGWN / Comb / Comb-IQ / Chirp): out.exists() False

  • They still asserted the OLD {prefix}.sig output name; the chain (PR #33) now writes the descriptive model.default_signal_filename() name.
  • Fixed: the tests capture tmp_path / f"{window.project.default_signal_filename()}.sig" before on_generate (the _finish_generation duration feedback rewrites the duration term of the name afterwards). Title assertion GenSig — {out} now matches the real written path.
  • Also upgraded three stale no-file literals (never.sig / badrate.sig / missing.sig) to assert the real descriptive path instead of passing trivially.

test_generate_shows_notice_and_writes_no_file: shown == []

  • Stale premise (ticket 36): the DEFAULT project waveform is Chirp→Up Chirp — implemented — so on_generate ran the real chain and spawned an uncaptured worker thread; that stray thread also produced the RuntimeError: main thread is not in main loop warning CI attributed to the following test.
  • Fixed: the test now explicitly selects Multi IQ (the actual notice path), gives it a valid band table + real OutputPath/FilePrefix, asserts the notice and that the descriptive-name file is never written. The notice path returns before any thread is spawned, so no more leaked workers.

test_ui_preview_window.py — 2 hover-marker tests: TypeError: TransformedBbox.contains() missing 1 required positional argument: 'y'

  • The _mpl_mouse fallback hit-test called bbox.contains((px, py)); matplotlib's Bbox.contains takes (x, y) as separate arguments (the CI matplotlib version enforces it).
  • Fixed: bbox.contains(px, py).

Gate

  • pytest 1173 passed / 63 skipped (headless tier), coverage 95.24 % ≥ 85 %
  • ruff check gensig tests clean; mypy gensig tests clean
  • The widget tier itself requires a display (xvfb) — not available in the dev container; the fixes follow the CI trace exactly. CI will exercise them.
Fixes the 7 CI failures reported after PR #34 merged. All are in the widget tier (tkinter), which is skipped on headless dev machines — none were introduced by #34; they stem from PR #33's output-naming change, ticket 36's notice premise and a matplotlib API drift in the CI image. ## Failures → fixes **`test_ui_window.py` — 4 generate tests (AGWN / Comb / Comb-IQ / Chirp): `out.exists()` False** - They still asserted the OLD `{prefix}.sig` output name; the chain (PR #33) now writes the descriptive `model.default_signal_filename()` name. - Fixed: the tests capture `tmp_path / f"{window.project.default_signal_filename()}.sig"` **before** `on_generate` (the `_finish_generation` duration feedback rewrites the duration term of the name afterwards). Title assertion `GenSig — {out}` now matches the real written path. - Also upgraded three stale no-file literals (`never.sig` / `badrate.sig` / `missing.sig`) to assert the real descriptive path instead of passing trivially. **`test_generate_shows_notice_and_writes_no_file`: `shown == []`** - Stale premise (ticket 36): the DEFAULT project waveform is Chirp→Up Chirp — implemented — so `on_generate` ran the real chain and spawned an **uncaptured** worker thread; that stray thread also produced the `RuntimeError: main thread is not in main loop` warning CI attributed to the following test. - Fixed: the test now explicitly selects Multi IQ (the actual notice path), gives it a valid band table + real OutputPath/FilePrefix, asserts the notice and that the descriptive-name file is never written. The notice path returns before any thread is spawned, so no more leaked workers. **`test_ui_preview_window.py` — 2 hover-marker tests: `TypeError: TransformedBbox.contains() missing 1 required positional argument: 'y'`** - The `_mpl_mouse` fallback hit-test called `bbox.contains((px, py))`; matplotlib's `Bbox.contains` takes `(x, y)` as separate arguments (the CI matplotlib version enforces it). - Fixed: `bbox.contains(px, py)`. ## Gate - `pytest` **1173 passed / 63 skipped** (headless tier), coverage **95.24 %** ≥ 85 % - `ruff check gensig tests` clean; `mypy gensig tests` clean - The widget tier itself requires a display (xvfb) — not available in the dev container; the fixes follow the CI trace exactly. CI will exercise them.
fix(tests): CI tkinter-tier failures — descriptive filenames, stale notice premise, matplotlib contains
All checks were successful
test / test (ubuntu-latest) (pull_request) Successful in 2m40s
1e542bf0dd
CI reported 7 failures after PR #34 merged (all in the widget tier, which
is skipped on headless dev machines; the failures pre-date #34 — they came
from PR #33's naming change, ticket 36's notice premise and a matplotlib
API drift in CI):

- test_ui_window generate tests (AGWN/Comb/Comb-IQ/Chirp): asserted the
  OLD '{prefix}.sig' output name; they now capture the descriptive
  default_signal_filename() path BEFORE on_generate (the duration
  feedback rewrites the name's duration term afterwards). The stale
  no-file literals ('never.sig', 'badrate.sig', 'missing.sig') now assert
  the real descriptive path instead of passing trivially.
- test_generate_shows_notice_and_writes_no_file: its premise died at
  ticket 36 — the DEFAULT project (Chirp/Up Chirp) is implemented, so
  on_generate spawned an uncaptured real worker (the stray
  'main thread is not in main loop' thread error CI attributed to the
  next test). It now explicitly selects Multi IQ (the actual notice
  path) with a valid band table, real OutputPath/FilePrefix, and asserts
  the descriptive-name file is never written.
- test_ui_preview_window _mpl_mouse helper: bbox.contains((px, py)) —
  matplotlib's Bbox.contains takes (x, y) separately; the tuple form
  raised TypeError under the CI matplotlib version.

Gate: pytest 1173 passed / 63 skipped (headless tier), coverage 95.24%;
ruff + mypy clean. The widget tier itself needs a display (xvfb) — not
available in the dev container; fixes follow the CI trace exactly.
ykp merged commit eb9156893e into master 2026-09-27 15:39:28 +02:00
Sign in to join this conversation.
No description provided.