diff --git a/test/test_art.py b/test/test_art.py index 4954106b5..d4ca814a5 100644 --- a/test/test_art.py +++ b/test/test_art.py @@ -261,6 +261,8 @@ class GoogleImageTest(UseThePlugin): self.assertEqual(list(result_url), []) +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class ArtImporterTest(UseThePlugin): def setUp(self): super(ArtImporterTest, self).setUp() diff --git a/test/test_convert.py b/test/test_convert.py index ab1fa2504..e6f75c0ad 100644 --- a/test/test_convert.py +++ b/test/test_convert.py @@ -64,6 +64,8 @@ class TestHelper(helper.TestHelper): .format(path, tag)) +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class ImportConvertTest(unittest.TestCase, TestHelper): def setUp(self): @@ -99,6 +101,8 @@ class ImportConvertTest(unittest.TestCase, TestHelper): self.assertTrue(os.path.isfile(item.path)) +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class ConvertCliTest(unittest.TestCase, TestHelper): def setUp(self): @@ -186,6 +190,8 @@ class ConvertCliTest(unittest.TestCase, TestHelper): self.assertFalse(os.path.exists(converted)) +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class NeverConvertLossyFilesTest(unittest.TestCase, TestHelper): """Test the effect of the `never_convert_lossy_files` option. """ diff --git a/test/test_dbcore.py b/test/test_dbcore.py index 3c1a3599b..00ef2f1fb 100644 --- a/test/test_dbcore.py +++ b/test/test_dbcore.py @@ -127,6 +127,8 @@ class TestModelWithGetters(dbcore.Model): return {} +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class MigrationTest(unittest.TestCase): """Tests the ability to change the database schema between versions. diff --git a/test/test_edit.py b/test/test_edit.py index 522437eaa..34bad25a7 100644 --- a/test/test_edit.py +++ b/test/test_edit.py @@ -15,6 +15,7 @@ from __future__ import (division, absolute_import, print_function, unicode_literals) import codecs +import os from mock import patch from test._common import unittest @@ -62,6 +63,8 @@ class ModifyFileMocker(object): f.write(contents) +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class EditCommandTest(unittest.TestCase, TestHelper): """ Black box tests for `beetsplug.edit`. Command line interaction is simulated using `test.helper.control_stdin()`, and yaml editing via an diff --git a/test/test_importer.py b/test/test_importer.py index b9f75f7ef..27dcd5a12 100644 --- a/test/test_importer.py +++ b/test/test_importer.py @@ -236,6 +236,8 @@ class ImportHelper(TestHelper): self.assertEqual(len(os.listdir(self.libdir)), 0) +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class NonAutotaggedImportTest(_common.TestCase, ImportHelper): def setUp(self): self.setup_beets(disk=True) diff --git a/test/test_logging.py b/test/test_logging.py index 81df95a78..8517f0a3f 100644 --- a/test/test_logging.py +++ b/test/test_logging.py @@ -5,6 +5,7 @@ from __future__ import (division, absolute_import, print_function, unicode_literals) import sys +import os import threading import logging as log from StringIO import StringIO @@ -163,6 +164,8 @@ class LoggingLevelTest(unittest.TestCase, helper.TestHelper): self.assertIn('dummy: debug import_stage', logs) +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class ConcurrentEventsTest(TestCase, helper.TestHelper): """Similar to LoggingLevelTest but lower-level and focused on multiple events interaction. Since this is a bit heavy we don't do it in diff --git a/test/test_ui.py b/test/test_ui.py index b32a4c452..08097b3f2 100644 --- a/test/test_ui.py +++ b/test/test_ui.py @@ -594,6 +594,8 @@ class InputTest(_common.TestCase): self.assertEqual(album, u'\xc2me') +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class ConfigTest(unittest.TestCase, TestHelper): def setUp(self): self.setup_beets() @@ -1035,6 +1037,8 @@ class PathFormatTest(_common.TestCase): self.assertEqual(pf[1:], default_formats) +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class PluginTest(_common.TestCase): def test_plugin_command_from_pluginpath(self): config['pluginpath'] = [os.path.join(_common.RSRC, 'beetsplug')] @@ -1042,6 +1046,8 @@ class PluginTest(_common.TestCase): ui._raw_main(['test']) +@unittest.skipIf('SKIP_SLOW_TESTS' in os.environ, + 'Skipping because test is slow') class CompletionTest(_common.TestCase): def test_completion(self): # Load plugin commands