test: strengthen audio playback coverage#5087
Merged
Merged
Conversation
fernandolins
added a commit
that referenced
this pull request
Jul 1, 2026
## Summary / motivation Two related bugs in the `check-linked-issue` workflow caused unnecessary noise on PRs: 1. **Wrong keywords**: the regex only accepted `closes`, `fixes`, and `resolves` variants, but the PR template explicitly shows `Refs #123` as a valid option. Any PR using `Refs #NNN`, `Ref #NNN`, or `References #NNN` was incorrectly flagged. Observed in #5087. 2. **Stale bot comment**: once the contributor added an issue link and the `missing-issue` label was removed, the bot's warning comment remained visible on the PR, creating unnecessary noise. ## Steps to reproduce (required, use N/A if not applicable) 1. Open a PR with `Refs #<open issue>` in the linked issue section (following the template hint). 2. Bot applies `missing-issue` label and posts a comment despite the issue being referenced. 3. Edit the PR description to use `Closes #NNN` instead, label is removed but the bot comment stays. ## How to test (required) 1. Open a draft PR with no issue link → verify label and comment are applied. 2. Edit the description to add `Refs #NNN` → verify label and comment are both removed. 3. Repeat with `Closes #NNN`, `Fixes #NNN`, `References #NNN`. ## Risk / compatibility / migration No Risk, CI workflow only.
Contributor
Author
|
@abdnh I fixed the tests for Windows. |
abdnh
approved these changes
Jul 2, 2026
abdnh
left a comment
Member
There was a problem hiding this comment.
Added a test for MpvManager, which is what I was mainly interested in testing since the original issue was caused by an argument passed to mpv there.
abdnh
added a commit
that referenced
this pull request
Jul 2, 2026
Missed a Linux failure in #5087 (review)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Refs #5016
Summary / motivation
Adds follow-up test coverage for audio playback after #5066.
This strengthens the previous basic sound tests by covering additional edge cases in
anki.soundand by adding a real mpv playback smoke test. The goal is to catch regressions where the mpv binary exists and responds to--version, but fails to actually load/decode/play an audio file in Anki's automated environment.Coverage added:
SoundOrVideoTag.path()with filenames containing directory separatorshooks.media_file_filterapplication in sound tag path resolution_packagedCmd()preference foranki_audioonly on macOS/WindowsSteps to reproduce
anki_audiobinary available.mpv --versionmay pass even if mpv cannot load/play an audio file.How to test
Run:
Both passed locally.
The mpv smoke test generates a minimal WAV file and runs mpv with headless/null audio-video output, so it validates decoding/playback without requiring audio hardware.
Before / after behavior
Before: coverage verified that mpv existed and responded to
--version, but did not prove it could play/decode an audio file.After: tests verify that mpv can load and play a generated WAV file in an automated headless mode.