-
-
Couldn't load subscription status.
- Fork 495
Fix all tests and make everything work offline/with mocks #1332
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
e9a5d62
Fix ``YoutubeDashManifestCreatorsTest``
litetex 4f9e2a9
Fix ``YoutubeMixPlaylistExtractorTest#Music`` and update mocks
litetex 084e66a
``YoutubeMusicSearchExtractor``: Add caching to improve performance
litetex 9ef3a6e
Disable YoutubeMusicSearchExtractor test
litetex 62b3c3b
Updated all YT mocks
litetex 487dfea
Fix ``YoutubeStreamExtractorRelatedMixTest``
litetex bbe57e9
[Soundcloud] Removed Top 50 as it no longer exists
litetex 2844424
[Soundcloud] Replaced no longer existing user
litetex c66ed65
Rename test + Fix assert order warning
litetex dda9783
Make ALL tests mockable
litetex a8c176a
Create new Mocks
litetex 902a7c1
Remove unused imports
litetex a9c7c95
[Soundcloud] Charts: Fetch correctly so that tests work
litetex 511a8a5
Fix corrupted response for ``YoutubeStreamExtractorLivestreamTest``
litetex 1e34f50
Add missing annotations
litetex 5c09e46
Fix test being not static and not executed
litetex 65abde6
SoundcloudSearchQHTest does no communication
litetex d094c7d
YoutubeServiceTest requires the Downloader but never uses it
litetex 3f88842
Delete old mocks
litetex b46169b
Remove additional boiler
litetex 89a0923
Improved code style
litetex 1b3a3f3
[SoundCloud] Purged Top 50
litetex 99b9cdb
Fix format
litetex 8bbb7e9
Modify ``SoundcloudChannelTabExtractorTest`` so that it compiles
litetex 60c7790
Add mockdata for new ``SoundcloudChannelTabExtractorTest``
litetex 599bc78
Improve naming
litetex 1621336
Fix typo
litetex 9a74872
Update docs
litetex 2d3a7ae
Init in setup
litetex 066553d
Cleanup
litetex de96e98
Fix naming
litetex c637c19
Updated mocks
litetex c443874
Fix broken real test and migrate mock data
litetex dd0f955
Removed unused mocks
litetex 4fa9d74
Improve n parameter tests
litetex 3f0b055
Use dedicated methods to fetch extractor related data
litetex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I meant here is to put
extractor()directly insuper.setUp()so we don't have to ever worry about the extractor not being initialized, or would that create issues? There are various other places where I saw// InitcommentsUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes because there is no setUp method that creates an extractor when the class derives from
InitYoutubeTest.Also regarding "so we don't have to ever worry about the extractor not being initialized" there is a reason why this is lazily initialized:
We had a bunch of tests where there was a extractor used exactly in this way but it was never used.
When initializing the extractor during setup all tests mark it as used despite maybe never doing so.
These are all places where this is used:

I now also refactored both classes to use dedicated methods which initialize the extractor.