Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e9a5d62
Fix ``YoutubeDashManifestCreatorsTest``
litetex Jul 10, 2025
4f9e2a9
Fix ``YoutubeMixPlaylistExtractorTest#Music`` and update mocks
litetex Jul 11, 2025
084e66a
``YoutubeMusicSearchExtractor``: Add caching to improve performance
litetex Jul 11, 2025
9ef3a6e
Disable YoutubeMusicSearchExtractor test
litetex Jul 11, 2025
62b3c3b
Updated all YT mocks
litetex Jul 11, 2025
487dfea
Fix ``YoutubeStreamExtractorRelatedMixTest``
litetex Jul 11, 2025
bbe57e9
[Soundcloud] Removed Top 50 as it no longer exists
litetex Jul 11, 2025
2844424
[Soundcloud] Replaced no longer existing user
litetex Jul 11, 2025
c66ed65
Rename test + Fix assert order warning
litetex Jul 11, 2025
dda9783
Make ALL tests mockable
litetex Jul 12, 2025
a8c176a
Create new Mocks
litetex Jul 12, 2025
902a7c1
Remove unused imports
litetex Jul 12, 2025
a9c7c95
[Soundcloud] Charts: Fetch correctly so that tests work
litetex Jul 12, 2025
511a8a5
Fix corrupted response for ``YoutubeStreamExtractorLivestreamTest``
litetex Jul 12, 2025
1e34f50
Add missing annotations
litetex Jul 12, 2025
5c09e46
Fix test being not static and not executed
litetex Jul 12, 2025
65abde6
SoundcloudSearchQHTest does no communication
litetex Jul 12, 2025
d094c7d
YoutubeServiceTest requires the Downloader but never uses it
litetex Jul 12, 2025
3f88842
Delete old mocks
litetex Jul 12, 2025
b46169b
Remove additional boiler
litetex Jul 12, 2025
89a0923
Improved code style
litetex Jul 13, 2025
1b3a3f3
[SoundCloud] Purged Top 50
litetex Jul 13, 2025
99b9cdb
Fix format
litetex Jul 13, 2025
8bbb7e9
Modify ``SoundcloudChannelTabExtractorTest`` so that it compiles
litetex Jul 13, 2025
60c7790
Add mockdata for new ``SoundcloudChannelTabExtractorTest``
litetex Jul 13, 2025
599bc78
Improve naming
litetex Jul 16, 2025
1621336
Fix typo
litetex Jul 16, 2025
9a74872
Update docs
litetex Jul 16, 2025
2d3a7ae
Init in setup
litetex Jul 16, 2025
066553d
Cleanup
litetex Jul 16, 2025
de96e98
Fix naming
litetex Jul 16, 2025
c637c19
Updated mocks
litetex Jul 16, 2025
c443874
Fix broken real test and migrate mock data
litetex Jul 16, 2025
dd0f955
Removed unused mocks
litetex Jul 16, 2025
4fa9d74
Improve n parameter tests
litetex Jul 16, 2025
3f0b055
Use dedicated methods to fetch extractor related data
litetex Jul 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestImageCollection;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.schabi.newpipe.extractor.ListExtractor.InfoItemsPage;
import org.schabi.newpipe.extractor.Page;
Expand Down Expand Up @@ -122,6 +123,14 @@ void testGetCommentsFromCommentsInfo() throws IOException, ExtractionException {
public static class NestedComments extends DefaultSimpleExtractorTest<PeertubeCommentsExtractor> {
private InfoItemsPage<CommentsInfoItem> comments = null;

@BeforeAll
@Override
public void setUp() throws Exception {
super.setUp();

extractor(); // Initialize
Copy link
Member

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 in super.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 // Init comments

Copy link
Member Author

@litetex litetex Jul 17, 2025

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 in super.setUp() so we don't have to ever worry about the extractor not being initialized, or would that create issues?

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.

There are various other places where I saw // Init comments

These are all places where this is used:
grafik

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

}

@Override
protected PeertubeCommentsExtractor createExtractor() throws Exception {
return (PeertubeCommentsExtractor) PeerTube
Expand All @@ -135,7 +144,6 @@ protected void fetchExtractor(final PeertubeCommentsExtractor extractor) throws

@Test
void testGetComments() throws IOException, ExtractionException {
extractor(); // Init
assertFalse(comments.getItems().isEmpty());
final Optional<CommentsInfoItem> nestedCommentHeadOpt =
findCommentWithId("34293", comments.getItems());
Expand All @@ -151,7 +159,6 @@ void testHasCreatorReply() {
}

private void assertCreatorReply(final String id, final boolean expected) {
extractor(); // Init
final Optional<CommentsInfoItem> comment =
findCommentWithId(id, comments.getItems());
assertTrue(comment.isPresent());
Expand Down