Skip to content

Conversation

@aw-was-here
Copy link
Collaborator

@aw-was-here aw-was-here commented Jun 17, 2025

Summary by Sourcery

Add a comprehensive asynchronous pytest suite for the djuced input plugin to validate its behavior under various scenarios

Tests:

  • Add integration tests for handling missing, empty, and blank M3U playlists
  • Validate filename-only playback detection and URL streaming support
  • Test artist/title parsing from extended Virtual DJ XML with and without remix tags
  • Verify relative path resolution, file substitution quirks, and polling observer mode
  • Ensure mix mode defaults to "newest" and random playlist retrieval

@sourcery-ai
Copy link

sourcery-ai bot commented Jun 17, 2025

Reviewer's Guide

This PR introduces a comprehensive pytest-based async integration suite for the djuced input plugin, exercising its file‐watching, parsing, quirk options, and playlist features, plus sample DJUCED playlist files for random‐track tests.

File-Level Changes

Change Details Files
Add core async integration tests for djuced plugin covering empty and missing file scenarios
  • Define djuced_bootstrap fixture with temp directory
  • Test behavior when no .m3u exists
  • Test empty .m3u and whitespace-only .m3u cases
tests/test_djuced.py
Implement file monitoring and detection tests including polling observer mode
  • Test initial no-file state then new .m3u detection
  • Enable and verify PollingObserver path-watcher
  • Validate filename field population on new file
tests/test_djuced.py
Extend parsing tests for encoding and VDJ tag formats plus mixmode behavior
  • Verify ASCII and UTF-8 m3u writes
  • Parse vdj ext-info normal, remix, ampersand cases
  • Ensure mixmode always defaults to 'newest'
tests/test_djuced.py
Add path resolution and file-substitution quirk tests
  • Resolve relative paths to absolute
  • Substitute file path roots using quirks/filesubst settings
tests/test_djuced.py
Add playlist random-track reading tests with sample DJUCED XML files
  • Initialize plugin DB and fetch random tracks by playlist name
  • Provide song1.xml, song2.xml and playing.txt under tests/playlists/djuced
tests/test_djuced.py
tests/playlists/djuced/song1.xml
tests/playlists/djuced/song2.xml
tests/playlists/djuced/playing.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov
Copy link

codecov bot commented Jun 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.61%. Comparing base (002a573) to head (e9d5efd).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1202      +/-   ##
==========================================
+ Coverage   66.37%   66.61%   +0.24%     
==========================================
  Files          62       62              
  Lines       10629    10629              
==========================================
+ Hits         7055     7081      +26     
+ Misses       3574     3548      -26     
Flag Coverage Δ
unittests 66.61% <ø> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants