Skip to content

test: cover player state, loop and stop rows of the release checklist - #676

Merged
FelipeDefensor merged 3 commits into
devfrom
test/player-and-loop
Oct 6, 2026
Merged

FelipeDefensor merged 3 commits into
devfrom
test/player-and-loop

Conversation

@FelipeDefensor

Copy link
Copy Markdown
Collaborator

Regression tests for the player and the loop:

  • The slider timeline's loop shading follows the zoom.
  • A redo that makes a loop invalid cancels it, the same way an undo does.
  • Changing the playback-rate spinbox with audio loaded changes the player's rate.
  • Stopping while paused goes back to the start; stopping while stopped does nothing.
  • Cancelling the local-file or YouTube-URL dialog leaves the loaded media alone.
  • Grouping a looped hierarchy keeps the loop.
  • Loading new media cancels an active loop, and looping a newly selected hierarchy works afterwards.

Three cases are marked xfail(strict=True), each fixed by a separate follow-up PR:

  • A failed media load stops the media that stays loaded: "fix: keep media playable when loading new media fails".
  • Scaling timelines to new media doesn't redraw the components: "fix: redraw timeline components after scaling".
  • The slider timeline's loop shading stays put on zoom: "fix: reposition the slider timeline's loop box on zoom".

The playback-rate test is skipped. It passes on its own, but in a parallel run on Windows an xdist worker died with heap corruption (0xc0000374) inside the Qt media engine while it changed the rate. Unchanged dev shows the same kind of crash in parallel runs, in other tests each time, so the skip may blame the wrong test. That's still being looked into.

tests/player/test_player.py's TestPlayer is skipped on CI, where driving the media engine is flaky. The two stop checks never start playback, so the last commit moves them into a TestStop class of their own that CI runs too.

Run: uv run --python 3.12 pytest tests/player tests/test_app.py tests/ui/timelines/test_timelineui_collection.py

Release-checklist rows: R117, R118, R119, R120, R124, R128, R130, R135, R140, R152, R156, R160. The IDs refer to the checklist copy in tilia-testing (release-checklist/test-links.csv); the code doesn't mention them.

Adds regression coverage for the slider timeline's loop box repositioning
when zooming, and for a redo that re-invalidates a loop cancelling it the
same way an undo does.

Marks two cases xfail(strict=True): loading media that fails while other
media is playing still calls Player.stop() before attempting the new
load, so playback of the media that remains current gets killed too
(tilia/media/player/base.py:98-99); and scale_timeline_components posts
no done-signal after rescaling, unlike crop_timeline_components, so
update_time_on_elements() never redraws components at their new,
rescaled positions (tilia/timelines/collection/collection.py:323-325).
Adds regression coverage for: changing the playback-rate spinbox with
audio loaded actually changes the player's rate; stopping while paused
resets to the start; stopping while already stopped is a no-op;
cancelling the local-file or YouTube-URL load dialogs leaves loaded
media untouched; grouping a looped hierarchy keeps the loop; loading
new media cancels an active loop; and looping a newly selected
hierarchy after that works.

Skips the playback-rate test: it passes on its own, but in a parallel
full-suite run the xdist worker died with a Windows heap-corruption
error (0xc0000374) inside the Qt media engine while changing the rate.
TestPlayer is skipped on CI because driving the Qt media engine there is
flaky. The two stop checks don't drive it: one loads media, sets the
current time and stops; the other asserts that stopping while already
stopped never reaches the engine. Keeping them inside TestPlayer meant
CI never ran them.

They move to a TestStop class of their own, and _load_example becomes a
module-level load_example() shared by both.
@FelipeDefensor
FelipeDefensor merged commit 958fd0f into dev Oct 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant