Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test_download.py #40

Merged
merged 3 commits into from
May 30, 2024
Merged

Conversation

deldesir
Copy link
Contributor

@deldesir deldesir commented May 30, 2024

Description

This PR includes changes to the test script to ensure that the --write-thumbnail option in xklb is properly tested. The test now asserts the existence of the thumbnail file after the download process.

Motivation and Context

This change is required to verify that the --write-thumbnail option works as expected. Ensuring the thumbnail file is downloaded correctly helps finding it by third party tool (iiab/calibre-web for example)

How has this been tested?

The changes were tested by running the updated test script in an environment with internet access. The test downloads a video from YouTube and checks for the existence of the thumbnail file in the specified directory. The test verifies the following:

  • The video and subtitles are downloaded correctly.
  • The specified thumbnail file is created and exists in the storage directory.

Testing environment:

  • Operating System: Ubuntu 24.10
  • Python Version: 3.12.3
  • xklb Version: 2.8.050

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Includes existence check for thumbnail file
@deldesir deldesir mentioned this pull request May 30, 2024
8 tasks
chapmanjacobd
chapmanjacobd previously approved these changes May 30, 2024
Copy link
Owner

@chapmanjacobd chapmanjacobd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. the only thing is that, for this test we don't want to skip it

tests/mediadb/test_download.py Outdated Show resolved Hide resolved
@chapmanjacobd chapmanjacobd merged commit 9f0eea5 into chapmanjacobd:main May 30, 2024
@chapmanjacobd
Copy link
Owner

chapmanjacobd commented May 30, 2024

Also, if a PR is related to an existing issue don't worry about filling out the PR description. Just write a good PR title and you can replace the whole description with a link to the related issue/comment

Thanks !

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