Skip to content

Commit ccdccdf

Browse files
committed
Remove slow_test unittest marker
1 parent a4ad7d4 commit ccdccdf

10 files changed

Lines changed: 1 addition & 34 deletions

File tree

CONTRIBUTING.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,6 @@ Use ``poe`` to run tests:
315315

316316
$ poe test [pytest options]
317317

318-
You can disable a hand-selected set of "slow" tests by setting the environment
319-
variable ``SKIP_SLOW_TESTS``, for example:
320-
321-
::
322-
323-
$ SKIP_SLOW_TESTS=1 poe test
324-
325318
Coverage
326319
++++++++
327320

beets/test/_common.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import os
2020
import sys
21-
import unittest
2221
from contextlib import contextmanager
2322
from typing import TYPE_CHECKING
2423

@@ -232,12 +231,3 @@ def system_mock(name):
232231
yield
233232
finally:
234233
platform.system = old_system
235-
236-
237-
def slow_test(unused=None):
238-
def _id(obj):
239-
return obj
240-
241-
if "SKIP_SLOW_TESTS" in os.environ:
242-
return unittest.skip("test is slow")
243-
return _id

test/plugins/test_art.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,6 @@ def test_fanarttv_only_other_images(self):
761761
next(self.source.get(album, self.settings, []))
762762

763763

764-
@_common.slow_test()
765764
class ArtImporterTest(UseThePlugin):
766765
def setUp(self):
767766
super().setUp()

test/plugins/test_convert.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class ConvertTestCase(IOMixin, ConvertMixin, PluginTestCase):
7171
plugin = "convert"
7272

7373

74-
@_common.slow_test()
7574
class ImportConvertTest(AsIsImporterMixin, ImportHelper, ConvertTestCase):
7675
def setUp(self):
7776
super().setUp()
@@ -133,7 +132,6 @@ def run_convert(self, *args):
133132
return self.run_convert_path(self.item, *args)
134133

135134

136-
@_common.slow_test()
137135
class ConvertCliTest(ConvertTestCase, ConvertCommand):
138136
def setUp(self):
139137
super().setUp()
@@ -309,7 +307,6 @@ def test_playlist_entry_keep_new_points_to_destination_file(self):
309307
self.assert_playlist_entry("converted.ogg", "--keep-new")
310308

311309

312-
@_common.slow_test()
313310
class NeverConvertLossyFilesTest(ConvertTestCase, ConvertCommand):
314311
"""Test the effect of the `never_convert_lossy_files` option."""
315312

test/plugins/test_edit.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from beets.dbcore.query import TrueQuery
2020
from beets.importer import Action
2121
from beets.library import Item
22-
from beets.test import _common
2322
from beets.test.helper import (
2423
AutotagImportTestCase,
2524
AutotagStub,
@@ -118,7 +117,6 @@ def run_mocked_command(self, modify_file_args={}, stdin=[], args=[]):
118117
self.run_command("edit", *args)
119118

120119

121-
@_common.slow_test()
122120
@patch("beets.library.Item.write")
123121
class EditCommandTest(IOMixin, EditMixin, BeetsTestCase):
124122
"""Black box tests for `beetsplug.edit`. Command line interaction is
@@ -315,7 +313,6 @@ def test_invalid_yaml(self, mock_write):
315313
assert mock_write.call_count == 0
316314

317315

318-
@_common.slow_test()
319316
class EditDuringImporterTestCase(
320317
EditMixin, TerminalImportMixin, AutotagImportTestCase
321318
):
@@ -332,7 +329,6 @@ def setUp(self):
332329
self.items_orig = [Item.from_path(f.path) for f in self.import_media]
333330

334331

335-
@_common.slow_test()
336332
class EditDuringImporterNonSingletonTest(EditDuringImporterTestCase):
337333
def setUp(self):
338334
super().setUp()
@@ -467,7 +463,6 @@ def test_edit_apply_candidate_singleton(self):
467463
assert all("match " in i.mb_trackid for i in self.lib.items())
468464

469465

470-
@_common.slow_test()
471466
class EditDuringImporterSingletonTest(EditDuringImporterTestCase):
472467
def setUp(self):
473468
super().setUp()

test/test_dbcore.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from beets import dbcore
2727
from beets.dbcore.db import DBCustomFunctionError, Index
2828
from beets.library import LibModel
29-
from beets.test import _common
3029
from beets.util import cached_classproperty
3130

3231
# Fixture: concrete database and model classes. For migration tests, we
@@ -167,7 +166,6 @@ def _template_funcs(self):
167166
return {}
168167

169168

170-
@_common.slow_test()
171169
class MigrationTest(unittest.TestCase):
172170
"""Tests the ability to change the database schema between
173171
versions.

test/test_importer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def track_lib_path(self):
7272
return self.lib_path / "Tag Artist" / "Tag Album" / "Tag Track 1.mp3"
7373

7474

75-
@_common.slow_test()
7675
class NonAutotaggedImportTest(PathsMixin, AsIsImporterMixin, ImportTestCase):
7776
db_on_disk = True
7877

test/test_logging.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import beets.logging as blog
1212
from beets import plugins, ui
13-
from beets.test import _common, helper
13+
from beets.test import helper
1414
from beets.test.helper import AsIsImporterMixin, ImportTestCase, PluginMixin
1515

1616

@@ -233,7 +233,6 @@ def test_import_stage_level2(self):
233233
assert "dummy: debug import_stage" in logs
234234

235235

236-
@_common.slow_test()
237236
class ConcurrentEventsTest(AsIsImporterMixin, ImportTestCase):
238237
"""Similar to LoggingLevelTest but lower-level and focused on multiple
239238
events interaction. Since this is a bit heavy we don't do it in

test/ui/commands/test_completion.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from ..test_ui import TestPluginTestCase
1313

1414

15-
@_common.slow_test()
1615
@pytest.mark.xfail(
1716
os.environ.get("GITHUB_ACTIONS") == "true" and sys.platform == "linux",
1817
reason="Completion is for some reason unhappy on Ubuntu 24.04 in CI",

test/ui/test_ui.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def test_uses_database_state_when_old_not_provided(self):
8080
]
8181

8282

83-
@_common.slow_test()
8483
class TestPluginTestCase(PluginTestCase):
8584
plugin = "test"
8685

@@ -361,7 +360,6 @@ def test_custom_paths_prepend(self):
361360
assert pf[1:] == default_formats
362361

363362

364-
@_common.slow_test()
365363
class PluginTest(TestPluginTestCase):
366364
def test_plugin_command_from_pluginpath(self):
367365
self.run_command("test")

0 commit comments

Comments
 (0)