-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
WIP: Improvements for networkless testing (#2128 revamped) #2174
Draft
hseg
wants to merge
7
commits into
spotDL:dev
Choose a base branch
from
hseg:fix-vcrs
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Nov 17, 2024
-
Cache network responses to focus on testing our consumption of the API. This makes the tests more robust to API rate-limiting and denoises them from network problems. - tests/console/test_entry_point.py::test_download_song - tests/console/test_entry_point.py::test_preload_song - tests/test_init.py::test_download - tests/test_init.py::test_get_urls - tests/test_matching.py::test_ytmusic_matching - tests/utils/test_ffmpeg.py::test_convert - tests/utils/test_m3u.py::test_create_m3u_content - tests/utils/test_m3u.py::test_create_m3u_file - tests/utils/test_metadata.py::test_embed_metadata - tests/utils/test_search.py::test_parse_query
Configuration menu - View commit details
-
Copy full SHA for 699f27d - Browse repository at this point
Copy the full SHA 699f27dView commit details -
Having trouble getting yt-dlp invocations to work nicely with vcrpy, suspect this is due to it receiving responses that are time-limited Affected tests: - tests/console/test_entry_point.py::test_download_song - tests/console/test_entry_point.py::test_preload_song - tests/test_init.py::test_get_urls - tests/test_init.py::test_download - tests/utils/test_ffmpeg.py::test_convert - tests/utils/test_metadata.py::test_embed_metadata
Configuration menu - View commit details
-
Copy full SHA for 6ebb628 - Browse repository at this point
Copy the full SHA 6ebb628View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1863ba - Browse repository at this point
Copy the full SHA c1863baView commit details -
Manually download urls passed to ffmpeg
This enables them to be picked up by vcrpy
Configuration menu - View commit details
-
Copy full SHA for 008af93 - Browse repository at this point
Copy the full SHA 008af93View commit details -
Mark unvcrable tests that still need network
This is necessary to allow testing with --block-network -- just pass -m 'not novcr' as well to disable these tests. Tests affected: - tests/utils/test_ffmpeg.py::test_download_ffmpeg However, I doubt whether this function is even necessary -- shouldn't we be providing binaries with ffmpeg bundled instead for those users who can't install it conveniently on their machines?
Configuration menu - View commit details
-
Copy full SHA for 8c8abf8 - Browse repository at this point
Copy the full SHA 8c8abf8View commit details -
To smooth out cassette regeneration workflow -- am constantly getting HTTP 401/429 responses, which is masking the cause of test failures.
Configuration menu - View commit details
-
Copy full SHA for c929126 - Browse repository at this point
Copy the full SHA c929126View commit details -
Some of these were forgotten -- marked, but never generated. Some would raise errors, indicating cached broken responses. Some of these needed to be regenerated so that the timestamp given to freezegun would be withing tolerable distance of their simulated request times -- given we're using a single freeze time for the entire project, all externally-facing cassettes (in our case, facing yt-dlp) need to be regenerated on each freezegun shift.
Configuration menu - View commit details
-
Copy full SHA for ca28b62 - Browse repository at this point
Copy the full SHA ca28b62View commit details
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.