diff --git a/tests/test_deezer_downloader.py b/tests/test_deezer_downloader.py index 3819cb5..0ffbbb8 100644 --- a/tests/test_deezer_downloader.py +++ b/tests/test_deezer_downloader.py @@ -287,7 +287,9 @@ def test_spotify_parser_invalid_playlist_url(self): class TestYoutubeMethods(unittest.TestCase): + is_github_ci = len(os.environ.get("GITHUB_ACTION", "")) > 0 + @pytest.mark.xfail(is_github_ci, reason="Fails with 'Sign in to confirm you’re not a bot. This helps protect our community. Learn more'", raises=YoutubeDLFailedException) def test_youtube_dl_valid_url(self): Path("/tmp/Pharrell Williams - Happy (Video).mp3").unlink(missing_ok=True) url = "https://www.youtube.com/watch?v=ZbZSe6N_BXs" @@ -304,6 +306,7 @@ def test_youtube_dl_invalid_url(self): with self.assertRaises(YoutubeDLFailedException): youtubedl_download(url, "/tmp") + @pytest.mark.xfail(is_github_ci, reason="Fails with 'Sign in to confirm you’re not a bot. This helps protect our community. Learn more'", raises=YoutubeDLFailedException) def test_youtube_dl_command_execution(self): url = "https://www.youtube.com/watch?v=ZbZSe6N_BXs&$(touch /tmp/pwned.txt)" youtubedl_download(url, "/tmp")