From 3d22d8d21f50d4dd249484cc7404e09cba3ec433 Mon Sep 17 00:00:00 2001 From: getzze Date: Fri, 22 Nov 2024 23:37:21 +0000 Subject: [PATCH] Update pre commit hooks versions (#1189) * update pre-commit versions * build docs with installed package * add missing subtitulamos items * simple readme --- .pre-commit-config.yaml | 6 +- .readthedocs.yaml | 1 + docs/conf.py | 5 -- docs/user/how_it_works.rst | 1 + pyproject.toml | 15 ++-- subliminal/__init__.py | 28 +++--- subliminal/providers/__init__.py | 4 +- subliminal/providers/tvsubtitles.py | 2 +- subliminal/refiners/metadata.py | 4 +- tests/conftest.py | 4 +- tests/providers/test_addic7ed.py | 108 +++++++++++------------ tests/providers/test_bsplayer.py | 10 +-- tests/providers/test_gestdown.py | 48 +++++----- tests/providers/test_napiprojekt.py | 12 +-- tests/providers/test_opensubtitles.py | 38 ++++---- tests/providers/test_opensubtitlescom.py | 34 +++---- tests/providers/test_podnapisi.py | 14 +-- tests/providers/test_providers.py | 12 +-- tests/providers/test_subtitulamos.py | 46 +++++----- tests/providers/test_tvsubtitles.py | 48 +++++----- tests/refiners/test_omdb.py | 34 +++---- tests/refiners/test_tmdb.py | 36 ++++---- tests/refiners/test_tvdb.py | 46 +++++----- 23 files changed, 277 insertions(+), 279 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 04e47c5f..a0c2e316 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,19 +8,19 @@ repos: - id: end-of-file-fixer - repo: https://github.com/crate-ci/typos - rev: v1.27.3 + rev: typos-dict-v0.11.35 hooks: - id: typos - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.4 + rev: v0.8.0 hooks: - id: ruff args: [--fix, --unsafe-fixes] - id: ruff-format - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.19 + rev: v0.23 hooks: - id: validate-pyproject name: validate-pyproject diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a0efadf9..a3759ffd 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,6 +6,7 @@ version: 2 build: os: ubuntu-22.04 tools: + # Keep in sync with CI.yaml/docs, hatch.toml and tox/docs. python: "3.12" python: diff --git a/docs/conf.py b/docs/conf.py index b8ca4e70..37c74ff2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,14 +12,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys -import os -import sphinx_rtd_theme - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath('..')) import subliminal # -- General configuration ------------------------------------------------ diff --git a/docs/user/how_it_works.rst b/docs/user/how_it_works.rst index 662b5a2b..0dd33718 100644 --- a/docs/user/how_it_works.rst +++ b/docs/user/how_it_works.rst @@ -13,6 +13,7 @@ subtitles. Current supported providers are: * OpenSubtitles * OpenSubtitles.com * Podnapisi +* Subtitulamos * TvSubtitles Providers all inherit the same :class:`~subliminal.providers.Provider` base class and thus share the same API. diff --git a/pyproject.toml b/pyproject.toml index d5929cdb..1963cccf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ -# https://peps.python.org/pep-0517/ +# https://packaging.python.org/en/latest/specifications/pyproject-toml/ [build-system] requires = ["setuptools>=64"] build-backend = "setuptools.build_meta" @@ -8,6 +8,7 @@ build-backend = "setuptools.build_meta" name = "subliminal" description = "Subtitles, faster than your thoughts" requires-python = ">=3.9" +readme = "README.rst" license = { text = "MIT" } authors = [{ name = "Antoine Bertin", email = "diaoulael@gmail.com" }] maintainers = [ @@ -31,7 +32,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Multimedia :: Video", ] -dynamic = ["version", "readme"] +dynamic = ["version"] dependencies = [ "babelfish>=0.6.1", "beautifulsoup4>=4.4.0", @@ -115,6 +116,7 @@ tvdb = "subliminal.refiners.tvdb:refine" addic7ed = "subliminal.converters.addic7ed:Addic7edConverter" opensubtitles = "subliminal.converters.opensubtitles:OpenSubtitlesConverter" opensubtitlescom = "subliminal.converters.opensubtitlescom:OpenSubtitlesComConverter" +subtitulamos = "subliminal.converters.subtitulamos:SubtitulamosConverter" tvsubtitles = "subliminal.converters.tvsubtitles:TVsubtitlesConverter" [tool.setuptools] @@ -132,7 +134,6 @@ where = ["."] [tool.setuptools.dynamic] version = {attr = "subliminal.__version__"} -readme = {file = ["README.rst", "HISTORY.rst"]} # https://docs.pytest.org/en/6.2.x/customize.html @@ -166,7 +167,10 @@ omit = [ ] [tool.coverage.paths] -source = [".tox/py*/**/site-packages"] +source = [ + "subliminal", + "**/site-packages/subliminal", +] [tool.coverage.run] source = ["subliminal"] @@ -218,9 +222,6 @@ ignore = [ "D401", # First line should be in imperative mood ] -[tool.ruff.lint.flake8-pytest-style] -mark-parentheses = true - [tool.ruff.lint.per-file-ignores] "docs/conf*.py" = ["ALL"] "subliminal/__init__.py" = ["E402"] diff --git a/subliminal/__init__.py b/subliminal/__init__.py index 98d2bba6..be2f8027 100644 --- a/subliminal/__init__.py +++ b/subliminal/__init__.py @@ -35,28 +35,28 @@ __all__ = [ - 'region', + 'SUBTITLE_EXTENSIONS', + 'VIDEO_EXTENSIONS', 'AsyncProviderPool', + 'Episode', + 'Error', + 'Movie', + 'Provider', + 'ProviderError', 'ProviderPool', + 'Subtitle', + 'Video', 'check_video', + 'compute_score', 'download_best_subtitles', 'download_subtitles', + 'get_scores', 'list_subtitles', + 'provider_manager', 'refine', + 'refiner_manager', + 'region', 'save_subtitles', 'scan_video', 'scan_videos', - 'Error', - 'ProviderError', - 'provider_manager', - 'refiner_manager', - 'Provider', - 'compute_score', - 'get_scores', - 'SUBTITLE_EXTENSIONS', - 'Subtitle', - 'VIDEO_EXTENSIONS', - 'Episode', - 'Movie', - 'Video', ] diff --git a/subliminal/providers/__init__.py b/subliminal/providers/__init__.py index eb4f8929..308f5db7 100644 --- a/subliminal/providers/__init__.py +++ b/subliminal/providers/__init__.py @@ -14,7 +14,7 @@ from xmlrpc.client import SafeTransport # Do not put babelfish in a TYPE_CHECKING block for intersphinx to work properly -from babelfish import Language # type: ignore[import-untyped] # noqa: TCH002 +from babelfish import Language # type: ignore[import-untyped] # noqa: TC002 from bs4 import BeautifulSoup, FeatureNotFound from requests import adapters from urllib3 import poolmanager # type: ignore[import-untyped] @@ -51,7 +51,7 @@ def init_poolmanager(self, connections: int, maxsize: int, block: bool = False, class TimeoutSafeTransport(SafeTransport): - """Timeout support for :library/xmlrpc.client:class:`~xmlrpc.client.SafeTransport`.""" + """Timeout support for :class:`!xmlrpc.client.SafeTransport`.""" timeout: float | None diff --git a/subliminal/providers/tvsubtitles.py b/subliminal/providers/tvsubtitles.py index f2106a87..285ea916 100644 --- a/subliminal/providers/tvsubtitles.py +++ b/subliminal/providers/tvsubtitles.py @@ -244,7 +244,7 @@ def query( # get the episode page logger.info('Getting the page for episode %d', episode_ids[episode]) - r = self.session.get(self.server_url + '/episode-%d.html' % episode_ids[episode], timeout=10) + r = self.session.get(self.server_url + f'/episode-{episode_ids[episode]:d}.html', timeout=10) soup = ParserBeautifulSoup(r.content, ['lxml', 'html.parser']) # loop over subtitles rows diff --git a/subliminal/refiners/metadata.py b/subliminal/refiners/metadata.py index e264bae1..47f83982 100644 --- a/subliminal/refiners/metadata.py +++ b/subliminal/refiners/metadata.py @@ -51,9 +51,9 @@ def refine(video: Video, *, embedded_subtitles: bool = True, **kwargs: Any) -> V # resolution if video_track.height in (480, 720, 1080): if video_track.interlaced: - video.resolution = '%di' % video_track.height + video.resolution = f'{video_track.height:d}i' else: - video.resolution = '%dp' % video_track.height + video.resolution = f'{video_track.height:d}p' logger.debug('Found resolution %s', video.resolution) # video codec diff --git a/tests/conftest.py b/tests/conftest.py index 379b75c8..ac35cf47 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -21,7 +21,7 @@ def _configure_region(): region.configure = Mock() # type: ignore[method-assign] -@pytest.fixture() +@pytest.fixture def movies() -> dict[str, Movie]: return { 'man_of_steel': Movie( @@ -83,7 +83,7 @@ def movies() -> dict[str, Movie]: } -@pytest.fixture() +@pytest.fixture def episodes() -> dict[str, Episode]: return { 'bbt_s07e05': Episode( diff --git a/tests/providers/test_addic7ed.py b/tests/providers/test_addic7ed.py index 42016f8e..77ac3431 100644 --- a/tests/providers/test_addic7ed.py +++ b/tests/providers/test_addic7ed.py @@ -18,32 +18,32 @@ PASSWORD = 'subliminal' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3_country_script(): assert language_converters['addic7ed'].convert('srp', None, 'Cyrl') == 'Serbian (Cyrillic)' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3_country(): assert language_converters['addic7ed'].convert('por', 'BR') == 'Portuguese (Brazilian)' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3(): assert language_converters['addic7ed'].convert('eus') == 'Euskera' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3_name_converter(): assert language_converters['addic7ed'].convert('fra') == 'French' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_reverse(): assert language_converters['addic7ed'].reverse('Chinese (Traditional)') == ('zho', None, None) -@pytest.mark.converter() +@pytest.mark.converter def test_converter_reverse_name_converter(): assert language_converters['addic7ed'].reverse('English') == ('eng', None, None) @@ -200,8 +200,8 @@ def test_configuration_error_no_password(): Addic7edProvider(username=USERNAME) -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_login(): provider = Addic7edProvider(USERNAME, PASSWORD) @@ -213,8 +213,8 @@ def test_login(): assert r.status_code == 302 -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_login_bad_password(): provider = Addic7edProvider(USERNAME, 'lanimilbus') @@ -222,8 +222,8 @@ def test_login_bad_password(): provider.initialize() -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_logout(): provider = Addic7edProvider(USERNAME, PASSWORD) @@ -235,7 +235,7 @@ def test_logout(): assert r.status_code == 302 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette('test_get_show_ids') def test_get_show_ids(): with Addic7edProvider() as provider: @@ -244,7 +244,7 @@ def test_get_show_ids(): assert show_ids['the big bang theory'] == 126 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette('test_get_show_ids') def test_get_show_ids_no_year(): with Addic7edProvider() as provider: @@ -253,7 +253,7 @@ def test_get_show_ids_no_year(): assert show_ids['dallas'] == 802 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette('test_get_show_ids') def test_get_show_ids_year(): with Addic7edProvider() as provider: @@ -262,7 +262,7 @@ def test_get_show_ids_year(): assert show_ids['dallas 2012'] == 2559 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette('test_get_show_ids') def test_get_show_ids_dot(): with Addic7edProvider() as provider: @@ -271,7 +271,7 @@ def test_get_show_ids_dot(): assert show_ids['mr robot'] == 5151 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette('test_get_show_ids') def test_get_show_ids_country(): with Addic7edProvider() as provider: @@ -280,7 +280,7 @@ def test_get_show_ids_country(): assert show_ids['being human us'] == 1317 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette('test_get_show_ids') def test_get_show_ids_quote(): with Addic7edProvider() as provider: @@ -289,7 +289,7 @@ def test_get_show_ids_quote(): assert show_ids['marvel s agents of s h i e l d'] == 4010 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette('test_get_show_ids') def test_get_show_ids_unicode(): with Addic7edProvider() as provider: @@ -299,8 +299,8 @@ def test_get_show_ids_unicode(): assert show_ids['alska mig'] == 7816 -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_search_show_id(): with Addic7edProvider() as provider: @@ -308,8 +308,8 @@ def test_search_show_id(): assert show_id == 126 -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_incomplete(): with Addic7edProvider() as provider: @@ -317,8 +317,8 @@ def test_search_show_id_incomplete(): assert show_id == 126 -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_no_year(): with Addic7edProvider() as provider: @@ -326,8 +326,8 @@ def test_search_show_id_no_year(): assert show_id == 802 -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_year(): with Addic7edProvider() as provider: @@ -335,8 +335,8 @@ def test_search_show_id_year(): assert show_id == 2559 -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_error(): with Addic7edProvider() as provider: @@ -344,8 +344,8 @@ def test_search_show_id_error(): assert show_id is None -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_quote(): with Addic7edProvider() as provider: @@ -353,8 +353,8 @@ def test_search_show_id_quote(): assert show_id == 30 -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_search_show_ids_quote_dots_mixed_case(episodes): video = episodes['marvels_agents_of_shield_s02e06'] @@ -365,8 +365,8 @@ def test_search_show_ids_quote_dots_mixed_case(episodes): assert show_ids == expected -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_search_show_ids_with_comma(episodes): video = episodes['alex_inc_s01e04'] @@ -377,8 +377,8 @@ def test_search_show_ids_with_comma(episodes): assert show_ids == expected -@pytest.mark.skip() -@pytest.mark.integration() +@pytest.mark.skip +@pytest.mark.integration @vcr.use_cassette def test_search_show_ids_with_country(episodes): with Addic7edProvider() as provider: @@ -388,7 +388,7 @@ def test_search_show_ids_with_country(episodes): assert show_ids == expected -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_show_id_quote_dots_mixed_case(episodes): video = episodes['marvels_agents_of_shield_s02e06'] @@ -397,7 +397,7 @@ def test_get_show_id_quote_dots_mixed_case(episodes): assert show_id == 4010 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_show_id_with_comma(episodes): video = episodes['alex_inc_s01e04'] @@ -406,7 +406,7 @@ def test_get_show_id_with_comma(episodes): assert show_id == 6388 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_show_id_country(): with Addic7edProvider() as provider: @@ -414,7 +414,7 @@ def test_get_show_id_country(): assert show_id == 1317 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_show_id_year(): with Addic7edProvider() as provider: @@ -422,7 +422,7 @@ def test_get_show_id_year(): assert show_id == 2559 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_show_id(): with Addic7edProvider() as provider: @@ -430,7 +430,7 @@ def test_get_show_id(): assert show_id == 802 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query(episodes): video = episodes['bbt_s07e05'] @@ -444,7 +444,7 @@ def test_query(episodes): assert subtitle.year is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_wrong_series(episodes): video = episodes['bbt_s07e05'] @@ -453,7 +453,7 @@ def test_query_wrong_series(episodes): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_parsing(episodes): video = episodes['got_s03e10'] @@ -478,7 +478,7 @@ def test_query_parsing(episodes): assert subtitle.release_group == 'EVOLVE' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_parsing_quote_dots_mixed_case(episodes): video = episodes['marvels_agents_of_shield_s02e06'] @@ -502,7 +502,7 @@ def test_query_parsing_quote_dots_mixed_case(episodes): assert subtitle.release_group == 'KILLERS' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_parsing_colon(episodes): video = episodes['csi_cyber_s02e03'] @@ -525,7 +525,7 @@ def test_query_parsing_colon(episodes): assert subtitle.release_group == 'DIMENSION' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_parsing_dash(episodes): video = episodes['the_x_files_s10e02'] @@ -547,7 +547,7 @@ def test_query_parsing_dash(episodes): assert subtitle.release_group == 'KILLERS' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_year(episodes): video = episodes['dallas_2012_s01e03'] @@ -561,7 +561,7 @@ def test_query_year(episodes): assert subtitle.year == video.year -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_no_year(episodes): video = episodes['dallas_s01e03'] @@ -576,7 +576,7 @@ def test_query_no_year(episodes): assert subtitle.year is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles(episodes): video = episodes['bbt_s07e05'] @@ -588,7 +588,7 @@ def test_list_subtitles(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle(episodes): video = episodes['bbt_s07e05'] @@ -600,7 +600,7 @@ def test_download_subtitle(episodes): assert subtitles[0].is_valid() is True -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_episode_alternative_series(episodes): video = episodes['turn_s04e03'] @@ -614,7 +614,7 @@ def test_list_subtitles_episode_alternative_series(episodes): assert matches == {'episode', 'title', 'series', 'season', 'year', 'country', 'release_group'} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_show_with_asterisk(episodes): video = episodes['the_end_of_the_fucking_world'] diff --git a/tests/providers/test_bsplayer.py b/tests/providers/test_bsplayer.py index 961dbf98..295bfec3 100644 --- a/tests/providers/test_bsplayer.py +++ b/tests/providers/test_bsplayer.py @@ -51,7 +51,7 @@ def test_get_matches_movie_hash(episodes): assert matches == {'hash'} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login(): provider = BSPlayerProvider(search_url=SEARCH_URL) @@ -60,7 +60,7 @@ def test_login(): assert provider.token is not None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_logout(): provider = BSPlayerProvider(search_url=SEARCH_URL) @@ -69,7 +69,7 @@ def test_logout(): assert provider.token is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_hash_size(movies): video = movies['man_of_steel'] @@ -103,7 +103,7 @@ def test_query_hash_size(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_hash(movies): video = movies['man_of_steel'] @@ -116,7 +116,7 @@ def test_list_subtitles_hash(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle(episodes): video = episodes['bbt_s07e05'] diff --git a/tests/providers/test_gestdown.py b/tests/providers/test_gestdown.py index 7bfdd0c6..1d0a575b 100644 --- a/tests/providers/test_gestdown.py +++ b/tests/providers/test_gestdown.py @@ -13,7 +13,7 @@ ) -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3_country(): assert language_converters['addic7ed'].convert('por', 'BR') == 'Portuguese (Brazilian)' @@ -130,7 +130,7 @@ def test_get_matches_no_match(episodes): assert matches == set() -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id(): with GestdownProvider() as provider: @@ -138,7 +138,7 @@ def test_search_show_id(): assert show_id == '91eb9278-8cf5-4ddd-9111-7f60b15958cb' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_incomplete(): with GestdownProvider() as provider: @@ -146,7 +146,7 @@ def test_search_show_id_incomplete(): assert show_id is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_no_year(): with GestdownProvider() as provider: @@ -154,7 +154,7 @@ def test_search_show_id_no_year(): assert show_id == '226d7f34-a9f5-4fe2-98d7-ecf944243714' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_error(): with GestdownProvider() as provider: @@ -162,7 +162,7 @@ def test_search_show_id_error(): assert show_id is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_quote(): with GestdownProvider() as provider: @@ -170,7 +170,7 @@ def test_search_show_id_quote(): assert show_id == 'cb13bb68-c637-4e0f-b79d-d4f1b4972380' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_series_tvdb_id(): with GestdownProvider() as provider: @@ -179,7 +179,7 @@ def test_search_show_series_tvdb_id(): assert show_id == '91eb9278-8cf5-4ddd-9111-7f60b15958cb' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_title_and_show_id_only_title(episodes): video = episodes['marvels_agents_of_shield_s02e06'] @@ -189,7 +189,7 @@ def test_get_title_and_show_id_only_title(episodes): assert show_id == '8976d3bb-a213-4210-9a03-f4b6d17ce540' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_title_and_show_id_with_tvdb_id(episodes): video = episodes['alex_inc_s01e04'] @@ -199,7 +199,7 @@ def test_get_title_and_show_id_with_tvdb_id(episodes): assert show_id == '6e507429-0994-443f-833e-1b06cbc18705' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_title_and_show_id_alternative_name(episodes): video = episodes['the_end_of_the_fucking_world'] @@ -209,7 +209,7 @@ def test_get_title_and_show_id_alternative_name(episodes): assert show_id == 'e789f371-ae07-4db4-b9aa-6b34e7e9e7b0' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_title_and_show_id_no_year(episodes): video = episodes['dallas_s01e03'] @@ -219,7 +219,7 @@ def test_get_title_and_show_id_no_year(episodes): assert show_id == '226d7f34-a9f5-4fe2-98d7-ecf944243714' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query(episodes): video = episodes['bbt_s07e05'] @@ -233,7 +233,7 @@ def test_query(episodes): assert subtitle.episode == video.episode -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_no_language(episodes): video = episodes['bbt_s07e05'] @@ -243,7 +243,7 @@ def test_query_no_language(episodes): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_wrong_series(episodes): video = episodes['bbt_s07e05'] @@ -252,7 +252,7 @@ def test_query_wrong_series(episodes): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_parsing(episodes): lang = Language('por', country='BR') @@ -275,7 +275,7 @@ def test_query_parsing(episodes): assert subtitle.release_group == 'All_with_preview' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_parsing_quote_dots_mixed_case(episodes): lang = Language('eng') @@ -297,7 +297,7 @@ def test_query_parsing_quote_dots_mixed_case(episodes): assert subtitle.release_group == '720p-KILLERS' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_parsing_colon(episodes): lang = Language('eng') @@ -319,7 +319,7 @@ def test_query_parsing_colon(episodes): assert subtitle.release_group == 'DIMENSION' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_parsing_dash(episodes): lang = Language('fra') @@ -341,7 +341,7 @@ def test_query_parsing_dash(episodes): assert subtitle.release_group == 'KILLERS' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_all_series(episodes): lang = Language('eng') @@ -356,7 +356,7 @@ def test_query_all_series(episodes): assert not all(sub.episode == video.episode for sub in subtitles) -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles(episodes): video = episodes['bbt_s07e05'] @@ -371,7 +371,7 @@ def test_list_subtitles(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle(episodes): video = episodes['bbt_s07e05'] @@ -383,7 +383,7 @@ def test_download_subtitle(episodes): assert subtitles[0].is_valid() is True -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_episode_alternative_series(episodes): video = episodes['turn_s04e03'] @@ -400,7 +400,7 @@ def test_list_subtitles_episode_alternative_series(episodes): assert matches == {'episode', 'title', 'series', 'season', 'country', 'year', 'release_group'} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_show_with_asterisk(episodes): video = episodes['the_end_of_the_fucking_world'] @@ -418,7 +418,7 @@ def test_show_with_asterisk(episodes): assert matches == {'country', 'series', 'episode', 'season', 'year'} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_with_bom(episodes): video = episodes['grimsburg_s01e01'] diff --git a/tests/providers/test_napiprojekt.py b/tests/providers/test_napiprojekt.py index 4d65fe33..74aa9e0d 100644 --- a/tests/providers/test_napiprojekt.py +++ b/tests/providers/test_napiprojekt.py @@ -29,7 +29,7 @@ def test_get_matches_no_match(episodes): assert matches == set() -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_microdvd(movies): language = Language('pol') @@ -44,7 +44,7 @@ def test_query_microdvd(movies): assert subtitle.subtitle_format == 'microdvd' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_srt(episodes): language = Language('pol') @@ -59,7 +59,7 @@ def test_query_srt(episodes): assert subtitle.subtitle_format == 'srt' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_srt_reencode(episodes): language = Language('pol') @@ -78,7 +78,7 @@ def test_query_srt_reencode(episodes): assert 'O czym myślisz?' in subtitle.text -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_wrong_hash(): with NapiProjektProvider() as provider: @@ -86,7 +86,7 @@ def test_query_wrong_hash(): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles(episodes): video = episodes['bbt_s07e05'] @@ -100,7 +100,7 @@ def test_list_subtitles(episodes): assert subtitle.is_valid() -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitles(episodes): video = episodes['got_s03e10'] diff --git a/tests/providers/test_opensubtitles.py b/tests/providers/test_opensubtitles.py index a5ed5cef..872c97f1 100644 --- a/tests/providers/test_opensubtitles.py +++ b/tests/providers/test_opensubtitles.py @@ -198,7 +198,7 @@ def test_configuration_error_no_password(): @pytest.mark.skip('authorization no longer works on the old API') -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login(): provider = OpenSubtitlesProvider(USERNAME, PASSWORD) @@ -207,7 +207,7 @@ def test_login(): assert provider.token is not None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login_bad_password(): provider = OpenSubtitlesProvider(USERNAME, 'lanimilbus') @@ -215,7 +215,7 @@ def test_login_bad_password(): provider.initialize() -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login_vip_login(): provider = OpenSubtitlesVipProvider(USERNAME, PASSWORD) @@ -223,7 +223,7 @@ def test_login_vip_login(): provider.initialize() -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login_vip_bad_password(): provider = OpenSubtitlesVipProvider(USERNAME, 'lanimilbus') @@ -232,7 +232,7 @@ def test_login_vip_bad_password(): @pytest.mark.skip('authorization no longer works on the old API') -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_logout(): provider = OpenSubtitlesProvider(USERNAME, PASSWORD) @@ -241,14 +241,14 @@ def test_logout(): assert provider.token is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_no_operation(): with OpenSubtitlesProvider() as provider: provider.no_operation() -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_not_enough_information(): languages = {Language('eng')} @@ -258,7 +258,7 @@ def test_query_not_enough_information(): assert str(excinfo.value) == 'Not enough information' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_query_movie(movies): video = movies['man_of_steel'] @@ -281,7 +281,7 @@ def test_query_query_movie(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_query_episode(episodes): video = episodes['dallas_2012_s01e03'] @@ -294,7 +294,7 @@ def test_query_query_episode(episodes): @pytest.mark.skip('query by tag currently broken on opensubtitles') -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_tag_movie(movies): video = movies['interstellar'] @@ -306,7 +306,7 @@ def test_query_tag_movie(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_imdb_id(movies): video = movies['man_of_steel'] @@ -326,7 +326,7 @@ def test_query_imdb_id(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_hash_size(movies): video = movies['man_of_steel'] @@ -350,7 +350,7 @@ def test_query_hash_size(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_wrong_hash_wrong_size(): languages = {Language('eng')} @@ -359,7 +359,7 @@ def test_query_wrong_hash_wrong_size(): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_query_season_episode(episodes): video = episodes['bbt_s07e05'] @@ -371,7 +371,7 @@ def test_query_query_season_episode(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_movie(movies): video = movies['man_of_steel'] @@ -418,7 +418,7 @@ def test_list_subtitles_movie(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_movie_no_hash(movies): video = movies['enders_game'] @@ -430,7 +430,7 @@ def test_list_subtitles_movie_no_hash(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_episode(episodes): video = episodes['marvels_agents_of_shield_s02e06'] @@ -442,7 +442,7 @@ def test_list_subtitles_episode(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle(movies): video = movies['man_of_steel'] @@ -456,7 +456,7 @@ def test_download_subtitle(movies): @pytest.mark.skip('query by tag currently broken on opensubtitles') -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_tag_match(episodes): video = episodes['the fall'] diff --git a/tests/providers/test_opensubtitlescom.py b/tests/providers/test_opensubtitlescom.py index b031a35c..30076b07 100644 --- a/tests/providers/test_opensubtitlescom.py +++ b/tests/providers/test_opensubtitlescom.py @@ -206,7 +206,7 @@ def test_configuration_error_no_password(): OpenSubtitlesComProvider(username=USERNAME) -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login(): provider = OpenSubtitlesComProvider(USERNAME, PASSWORD) @@ -216,7 +216,7 @@ def test_login(): assert provider.token is not None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login_bad_password(): provider = OpenSubtitlesComProvider(USERNAME, 'lanimilbus') @@ -225,7 +225,7 @@ def test_login_bad_password(): provider.login(wait=True) -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_logout(): provider = OpenSubtitlesComProvider(USERNAME, PASSWORD) @@ -235,7 +235,7 @@ def test_logout(): assert provider.token is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_user_infos(): with OpenSubtitlesComProvider(USERNAME, PASSWORD) as provider: @@ -244,7 +244,7 @@ def test_user_infos(): assert ret -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_not_enough_information(): languages = {Language('eng')} @@ -254,7 +254,7 @@ def test_query_not_enough_information(): assert str(excinfo.value) == 'Not enough information' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_query_movie(movies): video = movies['man_of_steel'] @@ -273,7 +273,7 @@ def test_query_query_movie(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_query_episode(episodes): video = episodes['dallas_2012_s01e03'] @@ -290,7 +290,7 @@ def test_query_query_episode(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_tag_movie(movies): video = movies['enders_game'] @@ -302,7 +302,7 @@ def test_query_tag_movie(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_imdb_id(movies): video = movies['man_of_steel'] @@ -321,7 +321,7 @@ def test_query_imdb_id(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_hash_size(movies): video = movies['man_of_steel'] @@ -346,7 +346,7 @@ def test_query_hash_size(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_wrong_hash_wrong_size(): languages = {Language('eng')} @@ -355,7 +355,7 @@ def test_query_wrong_hash_wrong_size(): provider.query(languages, moviehash='123456787654321') -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_query_season_episode(episodes): video = episodes['bbt_s07e05'] @@ -367,7 +367,7 @@ def test_query_query_season_episode(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_movie(movies): video = movies['man_of_steel'] @@ -398,7 +398,7 @@ def test_list_subtitles_movie(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_movie_no_hash(movies): video = movies['enders_game'] @@ -410,7 +410,7 @@ def test_list_subtitles_movie_no_hash(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_episode(episodes): video = episodes['marvels_agents_of_shield_s02e06'] @@ -422,7 +422,7 @@ def test_list_subtitles_episode(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle(movies): video = movies['man_of_steel'] @@ -435,7 +435,7 @@ def test_download_subtitle(movies): assert subtitles[0].encoding == 'utf-8' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_tag_match(episodes): video = episodes['the fall'] diff --git a/tests/providers/test_podnapisi.py b/tests/providers/test_podnapisi.py index 574d1db9..cae26ddb 100644 --- a/tests/providers/test_podnapisi.py +++ b/tests/providers/test_podnapisi.py @@ -118,7 +118,7 @@ def test_get_matches_no_match(episodes): assert matches == {'year', 'country'} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_movie(movies): video = movies['man_of_steel'] @@ -143,7 +143,7 @@ def test_query_movie(movies): assert {subtitle.language for subtitle in subtitles} == {language} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_episode(episodes): video = episodes['bbt_s07e05'] @@ -155,7 +155,7 @@ def test_query_episode(episodes): assert {subtitle.language for subtitle in subtitles} == {language} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_movie(movies): video = movies['man_of_steel'] @@ -182,7 +182,7 @@ def test_list_subtitles_movie(movies): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_episode(episodes): video = episodes['got_s03e10'] @@ -209,7 +209,7 @@ def test_list_subtitles_episode(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle(movies): video = movies['man_of_steel'] @@ -232,7 +232,7 @@ def test_download_subtitle(movies): assert subtitle.is_valid() -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_episode_alternative_series(episodes): video = episodes['marvels_jessica_jones_s01e13'] @@ -257,7 +257,7 @@ def test_list_subtitles_episode_alternative_series(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitles_with_title_unicode(movies): video = movies['café_society'] diff --git a/tests/providers/test_providers.py b/tests/providers/test_providers.py index 3465ab4f..a72adc78 100644 --- a/tests/providers/test_providers.py +++ b/tests/providers/test_providers.py @@ -25,7 +25,7 @@ ) -@pytest.fixture() +@pytest.fixture def _mock_providers(monkeypatch): for provider in provider_manager: monkeypatch.setattr(provider.plugin, 'initialize', Mock()) @@ -263,7 +263,7 @@ def test_download_subtitles(): assert provider_manager[name].plugin.download_subtitle.called -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_best_subtitles(episodes): video = episodes['bbt_s07e05'] @@ -283,7 +283,7 @@ def test_download_best_subtitles(episodes): assert {(s.provider_name, s.id) for s in subtitles[video]} == expected_subtitles -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_best_subtitles_min_score(episodes): video = episodes['bbt_s07e05'] @@ -320,7 +320,7 @@ def test_download_best_subtitles_undefined(episodes): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_best_subtitles_only_one(episodes): video = episodes['bbt_s07e05'] @@ -339,7 +339,7 @@ def test_download_best_subtitles_only_one(episodes): assert (subtitle.provider_name, subtitle.id) in expected_subtitles -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_bad_subtitle(movies): pool = ProviderPool() @@ -354,7 +354,7 @@ def test_download_bad_subtitle(movies): assert subtitle.is_valid() is False -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_providers_download(episodes): video = episodes['bbt_s07e05'] diff --git a/tests/providers/test_subtitulamos.py b/tests/providers/test_subtitulamos.py index c93f2201..12e0c13d 100644 --- a/tests/providers/test_subtitulamos.py +++ b/tests/providers/test_subtitulamos.py @@ -19,19 +19,19 @@ logger_name = 'subliminal.providers.subtitulamos' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3(): assert language_converters['subtitulamos'].convert('cat') == 'Català' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3_country(): assert language_converters['subtitulamos'].convert('spa', 'MX') == 'Español (Latinoamérica)' assert language_converters['subtitulamos'].convert('spa', 'AR') == 'Español (Latinoamérica)' assert language_converters['subtitulamos'].convert('por', 'BR') == 'Brazilian' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3_name_converter(): assert ( language_converters['subtitulamos'].convert( @@ -41,18 +41,18 @@ def test_converter_convert_alpha3_name_converter(): ) -@pytest.mark.converter() +@pytest.mark.converter def test_converter_reverse(): assert language_converters['subtitulamos'].reverse('Español') == ('spa', None, None) -@pytest.mark.converter() +@pytest.mark.converter def test_converter_reverse_country(): assert language_converters['subtitulamos'].reverse('Español (España)') == ('spa', None, None) assert language_converters['subtitulamos'].reverse('Español (Latinoamérica)') == ('spa', 'MX', None) -@pytest.mark.converter() +@pytest.mark.converter def test_converter_reverse_name_converter(): assert language_converters['subtitulamos'].reverse('French') == ('fra', None, None) @@ -75,7 +75,7 @@ def test_get_matches_episode(episodes): assert matches == {'release_group', 'series', 'year', 'country', 'episode', 'season', 'title'} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login(): provider = SubtitulamosProvider() @@ -84,7 +84,7 @@ def test_login(): assert provider.session is not None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_logout(): provider = SubtitulamosProvider() @@ -93,14 +93,14 @@ def test_logout(): assert provider.session is None -@pytest.mark.integration() +@pytest.mark.integration def test_logout_without_initialization(): provider = SubtitulamosProvider() with pytest.raises(NotInitializedProviderError): provider.terminate() -@pytest.mark.integration() +@pytest.mark.integration def test_list_subtitles_without_initialization(episodes): video = episodes['bbt_s11e16'] languages = {Language('eng'), Language('spa')} @@ -110,7 +110,7 @@ def test_list_subtitles_without_initialization(episodes): provider.list_subtitles(video, languages) -@pytest.mark.integration() +@pytest.mark.integration def test_list_subtitles_no_video_type(): video = {} # type: ignore[var-annotated] languages = {Language('spa')} @@ -120,7 +120,7 @@ def test_list_subtitles_no_video_type(): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_not_exist_series(caplog, episodes): with caplog.at_level(logging.DEBUG, logger=logger_name), SubtitulamosProvider() as provider: @@ -132,7 +132,7 @@ def test_list_subtitles_not_exist_series(caplog, episodes): assert caplog.records[-1].message.endswith('Series not found') -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_not_exist_season(caplog, episodes): with caplog.at_level(logging.DEBUG, logger=logger_name), SubtitulamosProvider() as provider: @@ -144,7 +144,7 @@ def test_list_subtitles_not_exist_season(caplog, episodes): assert caplog.records[-1].message.endswith('Season not found') -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_not_exist_episode(caplog, episodes): with caplog.at_level(logging.DEBUG, logger=logger_name), SubtitulamosProvider() as provider: @@ -156,7 +156,7 @@ def test_list_subtitles_not_exist_episode(caplog, episodes): assert caplog.records[-1].message.endswith('Episode not found') -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_not_exist_language(caplog, episodes): with caplog.at_level(logging.DEBUG, logger=logger_name), SubtitulamosProvider() as provider: @@ -167,7 +167,7 @@ def test_list_subtitles_not_exist_language(caplog, episodes): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_with_spanish_non_mx_search(caplog, episodes): with caplog.at_level(logging.DEBUG, logger=logger_name), SubtitulamosProvider() as provider: @@ -179,7 +179,7 @@ def test_list_subtitles_with_spanish_non_mx_search(caplog, episodes): assert all(s.language == Language('spa', 'AR') for s in subtitles) -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle(episodes): video = episodes['bbt_s11e16'] @@ -194,7 +194,7 @@ def test_download_subtitle(episodes): assert subtitle.is_valid() is True -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle_year(episodes): video = episodes['charmed_s01e01'] @@ -209,7 +209,7 @@ def test_download_subtitle_year(episodes): assert subtitle.is_valid() is True -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle_last_season(episodes): video = episodes['dw_s13e03'] @@ -230,7 +230,7 @@ def test_download_subtitle_last_season(episodes): assert subtitle.is_valid() is True -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle_first_episode(episodes): video = episodes['charmed_s01e01'] @@ -251,7 +251,7 @@ def test_download_subtitle_first_episode(episodes): assert subtitle.is_valid() is True -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle_foo(episodes): video = episodes['dw_s13e03'] @@ -266,7 +266,7 @@ def test_download_subtitle_foo(episodes): assert subtitle.is_valid() is True -@pytest.mark.integration() +@pytest.mark.integration def test_download_subtitle_missing_download_link(): subtitle = SubtitulamosSubtitle( language=Language('spa'), @@ -287,7 +287,7 @@ def test_download_subtitle_missing_download_link(): assert subtitle.is_valid() is False -@pytest.mark.integration() +@pytest.mark.integration def test_download_subtitle_without_initialization(): subtitle = SubtitulamosSubtitle( language=Language('spa'), diff --git a/tests/providers/test_tvsubtitles.py b/tests/providers/test_tvsubtitles.py index 7e68fea7..3a9436c8 100644 --- a/tests/providers/test_tvsubtitles.py +++ b/tests/providers/test_tvsubtitles.py @@ -14,27 +14,27 @@ ) -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3_country(): assert language_converters['tvsubtitles'].convert('por', 'BR') == 'br' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3(): assert language_converters['tvsubtitles'].convert('ukr') == 'ua' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_convert_alpha3_alpha2_converter(): assert language_converters['tvsubtitles'].convert('fra') == 'fr' -@pytest.mark.converter() +@pytest.mark.converter def test_converter_reverse(): assert language_converters['tvsubtitles'].reverse('gr') == ('ell', None, None) -@pytest.mark.converter() +@pytest.mark.converter def test_converter_reverse_name_converter(): assert language_converters['tvsubtitles'].reverse('en') == ('eng', None, None) @@ -119,7 +119,7 @@ def test_get_matches_no_match(episodes): assert matches == set() -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id(): with TVsubtitlesProvider() as provider: @@ -127,7 +127,7 @@ def test_search_show_id(): assert show_id == 154 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_incomplete(): with TVsubtitlesProvider() as provider: @@ -135,7 +135,7 @@ def test_search_show_id_incomplete(): assert show_id is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_ambiguous(): with TVsubtitlesProvider() as provider: @@ -143,7 +143,7 @@ def test_search_show_id_ambiguous(): assert show_id == 977 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_us(): with TVsubtitlesProvider() as provider: @@ -151,7 +151,7 @@ def test_search_show_id_us(): assert show_id == 1246 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_uk(): with TVsubtitlesProvider() as provider: @@ -159,7 +159,7 @@ def test_search_show_id_uk(): assert show_id == 657 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_no_year(): with TVsubtitlesProvider() as provider: @@ -167,7 +167,7 @@ def test_search_show_id_no_year(): assert show_id == 646 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_year_in_title(): with TVsubtitlesProvider() as provider: @@ -175,7 +175,7 @@ def test_search_show_id_year_in_title(): assert show_id == 1127 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_show_id_error(): with TVsubtitlesProvider() as provider: @@ -183,7 +183,7 @@ def test_search_show_id_error(): assert show_id is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_episode_ids(): expected_episode_ids = { @@ -217,7 +217,7 @@ def test_get_episode_ids(): assert episode_ids == expected_episode_ids -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_episode_ids_wrong_season(): with TVsubtitlesProvider() as provider: @@ -225,7 +225,7 @@ def test_get_episode_ids_wrong_season(): assert len(episode_ids) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query(episodes): video = episodes['bbt_s07e05'] @@ -247,7 +247,7 @@ def test_query(episodes): assert {subtitle.subtitle_id for subtitle in subtitles} == expected_subtitles -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_no_year(episodes): video = episodes['dallas_s01e03'] @@ -259,7 +259,7 @@ def test_query_no_year(episodes): assert {subtitle.subtitle_id for subtitle in subtitles} == expected_subtitles -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_with_quote(episodes): video = episodes['marvels_agents_of_shield_s02e06'] @@ -271,7 +271,7 @@ def test_query_with_quote(episodes): assert {subtitle.subtitle_id for subtitle in subtitles} == expected_subtitles -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_wrong_series(episodes): video = episodes['bbt_s07e05'] @@ -280,7 +280,7 @@ def test_query_wrong_series(episodes): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_wrong_episode(episodes): video = episodes['bbt_s07e05'] @@ -290,7 +290,7 @@ def test_query_wrong_episode(episodes): assert len(subtitles) == 0 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles(episodes): video = episodes['bbt_s07e05'] @@ -303,7 +303,7 @@ def test_list_subtitles(episodes): assert subtitles[0].release == 'The Big Bang Theory 7x05 (HDTV.LOL)' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_list_subtitles_episode_alternative_series(episodes): video = episodes['turn_s03e01'] @@ -315,7 +315,7 @@ def test_list_subtitles_episode_alternative_series(episodes): assert {subtitle.language for subtitle in subtitles} == languages -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle(episodes): video = episodes['bbt_s07e05'] @@ -327,7 +327,7 @@ def test_download_subtitle(episodes): assert subtitles[0].is_valid() is True -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_download_subtitle_with_quote(episodes): video = episodes['marvels_agents_of_shield_s02e06'] diff --git a/tests/refiners/test_omdb.py b/tests/refiners/test_omdb.py index 990f42f2..d245203e 100644 --- a/tests/refiners/test_omdb.py +++ b/tests/refiners/test_omdb.py @@ -14,7 +14,7 @@ ) -@pytest.fixture() +@pytest.fixture def client(): return OMDBClient() @@ -39,35 +39,35 @@ def test_apikey(): assert client.session.params['apikey'] == apikey # type: ignore[index,call-overload] -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_id(client): data = client.search_by_id('tt0770828') assert data['Title'] == 'Man of Steel' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_wrong_id(client): data = client.search_by_id('tt9999999') assert not data -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_title(client): data = client.search_by_title('Man of Steel') assert data['imdbID'] == 'tt0770828' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_wrong_title(client): data = client.search_by_title('Meen of Stal') assert not data -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search(client): data = client.search('Man of Steel') @@ -77,28 +77,28 @@ def test_search(client): assert data['Search'][0]['Year'] == '2013' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_wrong_title(client): data = client.search('Meen of Stal') assert not data -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_type(client): data = client.search('Man of Steel', is_movie=True) assert data['totalResults'] == '28' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_year(client): data = client.search('Man of Steel', year=2013) assert data['totalResults'] == '15' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_page(client): data = client.search('Man of Steel', page=3) @@ -108,7 +108,7 @@ def test_search_page(client): assert data['Search'][0]['Title'] == 'Kurt Morrow: Man of Steel' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode(episodes): episode = Episode( @@ -123,7 +123,7 @@ def test_refine_episode(episodes): assert episode.series_imdb_id == episodes['bbt_s07e05'].series_imdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_original_series(episodes): episode = Episode( @@ -138,7 +138,7 @@ def test_refine_episode_original_series(episodes): assert episode.series_imdb_id == 'tt0077000' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_year(episodes): episode = Episode( @@ -155,7 +155,7 @@ def test_refine_episode_year(episodes): assert episode.series_imdb_id == 'tt1723760' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_movie(movies): movie = Movie(movies['man_of_steel'].name, movies['man_of_steel'].title.lower()) @@ -165,7 +165,7 @@ def test_refine_movie(movies): assert movie.imdb_id == movies['man_of_steel'].imdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_movie_guess_alternative_title(movies): movie = Movie.fromname(movies['jack_reacher_never_go_back'].name) @@ -175,7 +175,7 @@ def test_refine_movie_guess_alternative_title(movies): assert movie.imdb_id == movies['jack_reacher_never_go_back'].imdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_with_country(episodes): episode = Episode.fromname(episodes['shameless_us_s08e01'].name) @@ -186,7 +186,7 @@ def test_refine_episode_with_country(episodes): assert episode.series_imdb_id is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_with_country_hoc_us(episodes): episode = Episode.fromname(episodes['house_of_cards_us_s06e01'].name) diff --git a/tests/refiners/test_tmdb.py b/tests/refiners/test_tmdb.py index 3fa6edb3..b494c3f3 100644 --- a/tests/refiners/test_tmdb.py +++ b/tests/refiners/test_tmdb.py @@ -17,7 +17,7 @@ TMDB_API_KEY = '3dac925d5d494853ea6ef9161011fbb3' -@pytest.fixture() +@pytest.fixture def client(): return TMDBClient(apikey=TMDB_API_KEY) @@ -42,7 +42,7 @@ def test_apikey(): assert client.session.params['api_key'] == apikey # type: ignore[index,call-overload] -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_movie(client): data = client.search('Man of Steel', is_movie=True) @@ -52,21 +52,21 @@ def test_search_movie(client): assert movie['release_date'] == '2013-06-12' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_movie_wrong_title(client): data = client.search('Meen of Stal', is_movie=True) assert data == [] -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_movie_year(client): data = client.search('Man of Steel', is_movie=True, year=2013) assert len(data) == 1 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_movie_page(client): data = client.search('James Bond', is_movie=True, page=2) @@ -76,7 +76,7 @@ def test_search_movie_page(client): assert movie['title'] == 'In Search of James Bond with Jonathan Ross' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_series(client): data = client.search('The Big Bang Theory', is_movie=False) @@ -86,35 +86,35 @@ def test_search_series(client): assert series['first_air_date'] == '2007-09-24' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_series_wrong_name(client): data = client.search('The Bing Bag Theory', is_movie=False) assert not data -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_movie_id(client): id_ = client.get_id('Man of Steel', is_movie=True) assert id_ == 49521 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_movie_id_failed(client): id_ = client.get_id('Meen of Stal', is_movie=True) assert id_ is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_series_id(client): id_ = client.get_id('The Big Bang Theory', is_movie=False) assert id_ == 1418 -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_series_wrong_id(client): id_ = client.get_id('The Bing Bag Theory', is_movie=False) @@ -127,7 +127,7 @@ def test_refine_no_apikey(movies): assert movie.tmdb_id is None -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode(episodes): episode = Episode( @@ -142,7 +142,7 @@ def test_refine_episode(episodes): assert episode.series_imdb_id == episodes['bbt_s07e05'].series_imdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_original_series(episodes): episode = Episode( @@ -157,7 +157,7 @@ def test_refine_episode_original_series(episodes): assert episode.series_imdb_id == 'tt0077000' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_year(episodes): episode = Episode( @@ -174,7 +174,7 @@ def test_refine_episode_year(episodes): assert episode.series_imdb_id == 'tt1723760' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_movie(movies): movie = Movie(movies['man_of_steel'].name, movies['man_of_steel'].title.lower()) @@ -184,7 +184,7 @@ def test_refine_movie(movies): assert movie.imdb_id == movies['man_of_steel'].imdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_movie_guess_alternative_title(movies): movie = Movie.fromname(movies['jack_reacher_never_go_back'].name) @@ -194,7 +194,7 @@ def test_refine_movie_guess_alternative_title(movies): assert movie.imdb_id == movies['jack_reacher_never_go_back'].imdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_with_country(episodes): episode = Episode.fromname(episodes['shameless_us_s08e01'].name) @@ -205,7 +205,7 @@ def test_refine_episode_with_country(episodes): assert episode.series_imdb_id == 'tt1586680' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_with_country_hoc_us(episodes): episode = Episode.fromname(episodes['house_of_cards_us_s06e01'].name) diff --git a/tests/refiners/test_tvdb.py b/tests/refiners/test_tvdb.py index f11a58fa..065471e0 100644 --- a/tests/refiners/test_tvdb.py +++ b/tests/refiners/test_tvdb.py @@ -16,7 +16,7 @@ ) -@pytest.fixture() +@pytest.fixture def client(): return TVDBClient() @@ -94,7 +94,7 @@ def test_headers(): assert client.session.headers['X-Test'] == 'Value' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login_error(): client = TVDBClient('1234') @@ -102,7 +102,7 @@ def test_login_error(): client.login() -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_login(client): assert client.token is None @@ -114,7 +114,7 @@ def test_login(client): assert client.token_expired is False -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_token_needs_refresh(client, monkeypatch): monkeypatch.setattr(client, 'refresh_token_every', timedelta(milliseconds=100)) @@ -125,7 +125,7 @@ def test_token_needs_refresh(client, monkeypatch): assert client.token_needs_refresh -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refresh_token(client): client.login() @@ -135,7 +135,7 @@ def test_refresh_token(client): assert client.token != old_token -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_series(client): data = client.search_series('The Big Bang Theory') @@ -145,14 +145,14 @@ def test_search_series(client): assert series['firstAired'] == '2007-09-24' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_search_series_wrong_name(client): data = client.search_series('The Bing Bag Theory') assert data == {} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_series(client): series = client.get_series(80379) @@ -161,14 +161,14 @@ def test_get_series(client): assert series['imdbId'] == 'tt0898266' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_series_wrong_id(client): series = client.get_series(999999999) assert series == {} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_series_actors(client): actors = client.get_series_actors(80379) @@ -176,14 +176,14 @@ def test_get_series_actors(client): assert 'Jim Parsons' in {a['name'] for a in actors} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_get_series_actors_wrong_id(client): actors = client.get_series_actors(999999999) assert actors == [] -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_series_episodes(client): episodes_data = client.query_series_episodes(80379, aired_season=7, aired_episode=5) @@ -195,14 +195,14 @@ def test_query_series_episodes(client): assert episodes_data['data'][0]['episodeName'] == 'The Workplace Proximity' -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_query_series_episodes_wrong_season(client): episodes_data = client.query_series_episodes(80379, aired_season=99) assert episodes_data == {} -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine(episodes): video = episodes['bbt_s07e05'] @@ -218,7 +218,7 @@ def test_refine(episodes): assert episode.series_tvdb_id == video.series_tvdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_partial(episodes): video = episodes['csi_s15e18'] @@ -234,7 +234,7 @@ def test_refine_episode_partial(episodes): assert episode.series_tvdb_id == video.series_tvdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_ambiguous(episodes): video = episodes['colony_s01e09'] @@ -250,7 +250,7 @@ def test_refine_ambiguous(episodes): assert episode.series_tvdb_id == video.series_tvdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_ambiguous_2(episodes): video = episodes['the_100_s03e09'] @@ -266,7 +266,7 @@ def test_refine_ambiguous_2(episodes): assert episode.series_tvdb_id == video.series_tvdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_year(episodes): video = episodes['dallas_2012_s01e03'] @@ -289,7 +289,7 @@ def test_refine_episode_year(episodes): assert episode.series_tvdb_id == video.series_tvdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_no_year(episodes): video = episodes['dallas_s01e03'] @@ -305,7 +305,7 @@ def test_refine_episode_no_year(episodes): assert episode.series_tvdb_id == video.series_tvdb_id -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_alternative_series(episodes): video = episodes['turn_s04e03'] @@ -322,7 +322,7 @@ def test_refine_episode_alternative_series(episodes): assert episode.alternative_series == video.alternative_series -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_with_comma(episodes): video = episodes['alex_inc_s01e04'] @@ -339,7 +339,7 @@ def test_refine_episode_with_comma(episodes): assert episode.alternative_series == video.alternative_series -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_with_country(episodes): video = episodes['shameless_us_s08e01'] @@ -356,7 +356,7 @@ def test_refine_episode_with_country(episodes): assert episode.alternative_series == video.alternative_series -@pytest.mark.integration() +@pytest.mark.integration @vcr.use_cassette def test_refine_episode_with_country_hoc_us(episodes): video = episodes['house_of_cards_us_s06e01']