From 68a9f2fb0c14ed2f844980ca63a704dd0afab340 Mon Sep 17 00:00:00 2001 From: Vitiko Date: Sat, 1 Jan 2022 19:20:33 -0400 Subject: Handle InvalidFile with Embedded Subtitles Provider (close #1652) --- tests/subliminal_patch/test_embeddedsubtitles.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/subliminal_patch/test_embeddedsubtitles.py b/tests/subliminal_patch/test_embeddedsubtitles.py index c9c8e7cd5..e42330425 100644 --- a/tests/subliminal_patch/test_embeddedsubtitles.py +++ b/tests/subliminal_patch/test_embeddedsubtitles.py @@ -6,6 +6,7 @@ import pytest import fese from fese import FFprobeSubtitleStream from subliminal_patch.core import Episode, Movie +from subliminal_patch.exceptions import MustGetBlacklisted from subliminal_patch.providers.embeddedsubtitles import EmbeddedSubtitlesProvider from subzero.language import Language @@ -223,5 +224,8 @@ def test_download_invalid_subtitle(video_single_language): provider._cached_paths[subtitle.container.path] = { subtitle.stream.index: "dummy.srt" } - with pytest.raises(fese.InvalidFile): + try: provider.download_subtitle(subtitle) + except MustGetBlacklisted as error: + assert error.id == subtitle.id + assert error.media_type == subtitle.media_type -- cgit v1.2.3