Merge branch 'master' into j/fix-class-check
This commit is contained in:
commit
4e060a276d
13 changed files with 25 additions and 23 deletions
|
|
@ -2,12 +2,12 @@ from typing import Optional
|
|||
|
||||
import pytest
|
||||
from conftest import mock_run_from_cli
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.utils.file_handler import FileMetadata
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestView:
|
||||
@pytest.mark.parametrize("split_chapters", [True, False])
|
||||
def test_view_from_cli(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ def youtube_release_preset_dict(output_directory):
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestAudioExtract:
|
||||
@pytest.mark.parametrize("dry_run", [False])
|
||||
def test_audio_extract_single_song(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from typing import Dict
|
|||
import pytest
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ def chapters_from_comments_preset_dict(sponsorblock_and_subs_preset_dict: Dict)
|
|||
return sponsorblock_and_subs_preset_dict
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestChapters:
|
||||
@pytest.mark.parametrize("dry_run", [True, False])
|
||||
def test_chapters_sponsorblock_and_removal_with_subs(
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import pytest
|
|||
from conftest import assert_logs
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.downloaders.ytdlp import YTDLP
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
|
@ -39,7 +39,7 @@ def rolling_recent_channel_preset_dict(recent_preset_dict):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestDateRange:
|
||||
@pytest.mark.parametrize("dry_run", [True, False])
|
||||
@pytest.mark.parametrize("date_range_breaks", [True, False])
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ def preset_dict(output_directory):
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestFileConvert:
|
||||
@pytest.mark.parametrize("dry_run", [True, False])
|
||||
def test_file_convert(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ def livestream_preset_dict(output_directory):
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestFileConvert:
|
||||
def test_livestreams_download_filtered(
|
||||
self,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import mergedeep
|
|||
import pytest
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
from ytdl_sub.utils.exceptions import ValidationException
|
||||
|
|
@ -58,7 +58,7 @@ def yt_album_as_chapters_with_regex_preset_dict(yt_album_as_chapters_preset_dict
|
|||
return yt_album_as_chapters_preset_dict
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestSplitByChapters:
|
||||
@pytest.mark.parametrize("dry_run", [True, False])
|
||||
def test_video_with_chapters(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.config.config_file import ConfigFile
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
|
@ -32,7 +32,7 @@ def test_single_video_subs_embed_and_file_preset_dict(single_video_subs_embed_pr
|
|||
return single_video_subs_embed_preset_dict
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestSubtitles:
|
||||
def test_subtitle_lang_variable_partial_validates(self, default_config):
|
||||
default_config_dict = default_config.as_dict()
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from typing import Dict
|
|||
|
||||
import pytest
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.config.config_file import ConfigFile
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
|
@ -51,7 +51,7 @@ def tv_show_collection_bilateral_dict(output_directory):
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestBilateral:
|
||||
def test_tv_show_by_date_downloads_bilateral(
|
||||
self,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import pytest
|
|||
from conftest import assert_logs
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.downloaders.ytdlp import YTDLP
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
|
@ -23,6 +24,7 @@ def subscription_dict(output_directory):
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="Soundcloud tests cannot run in GH")
|
||||
class TestSoundcloudDiscography:
|
||||
"""
|
||||
Downloads my (bad) SC recordings I made. Ensure the above files exist and have the
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from typing import Callable, Dict
|
|||
import pytest
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.config.config_file import ConfigFile
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
|
@ -42,7 +42,7 @@ def channel_preset_dict(output_directory):
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestChannel:
|
||||
"""
|
||||
Downloads my old minecraft youtube channel. Ensure the above files exist and have the
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
from expected_download import assert_expected_downloads
|
||||
from expected_transaction_log import assert_transaction_log_matches
|
||||
from resources import DISABLE_YOUTUBE_TESTS
|
||||
from resources import DISABLE_E2E_TESTS
|
||||
|
||||
from ytdl_sub.subscriptions.subscription import Subscription
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ def single_video_preset_dict(output_directory):
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.skipif(DISABLE_YOUTUBE_TESTS, reason="YouTube tests cannot run in GH")
|
||||
@pytest.mark.skipif(DISABLE_E2E_TESTS, reason="YouTube tests cannot run in GH")
|
||||
class TestYoutubeVideo:
|
||||
@pytest.mark.parametrize("dry_run", [True, False])
|
||||
def test_single_video_download(
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import shutil
|
|||
from pathlib import Path
|
||||
from typing import Dict
|
||||
|
||||
DISABLE_YOUTUBE_TESTS: bool = True
|
||||
DISABLE_E2E_TESTS: bool = True
|
||||
REGENERATE_FIXTURES: bool = False
|
||||
|
||||
RESOURCE_PATH: Path = Path("tests") / "resources"
|
||||
|
|
|
|||
Loading…
Reference in a new issue