From fa9262d61b65b5023b3be6bd68bd04c434cb3b5c Mon Sep 17 00:00:00 2001 From: Fabrice Laporte Date: Tue, 2 May 2017 01:05:18 +0200 Subject: [PATCH] Disable tests that do real requests to lyrics sites by default. Set BEETS_TEST_LYRICS_SOURCES environment variable to '1' to not skip the tests. --- test/test_lyrics.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_lyrics.py b/test/test_lyrics.py index b6abf8d9e..9ed0eb4b4 100644 --- a/test/test_lyrics.py +++ b/test/test_lyrics.py @@ -295,6 +295,8 @@ class LyricsPluginSourcesTest(LyricsGoogleBaseTest): LyricsGoogleBaseTest.setUp(self) self.plugin = lyrics.LyricsPlugin() + @unittest.skipUnless(os.environ.get('BEETS_TEST_LYRICS_SOURCES', '0') == '1', + 'lyrics sources testing not enabled') def test_backend_sources_ok(self): """Test default backends with songs known to exist in respective databases. """ @@ -305,6 +307,8 @@ class LyricsPluginSourcesTest(LyricsGoogleBaseTest): errors.append(s['backend'].__name__) self.assertFalse(errors) + @unittest.skipUnless(os.environ.get('BEETS_TEST_LYRICS_SOURCES', '0') == '1', + 'lyrics sources testing not enabled') def test_google_sources_ok(self): """Test if lyrics present on websites registered in beets google custom search engine are correctly scraped."""