mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Incorporate _common.Assertions into helper.TestHelper
This commit is contained in:
parent
74fee8d886
commit
2566e22744
3 changed files with 6 additions and 10 deletions
|
|
@ -142,7 +142,7 @@ def has_program(cmd, args=["--version"]):
|
|||
return True
|
||||
|
||||
|
||||
class TestHelper:
|
||||
class TestHelper(_common.Assertions):
|
||||
"""Helper mixin for high-level cli and plugin tests.
|
||||
|
||||
This mixin provides methods to isolate beets' global state provide
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ def create_archive(session):
|
|||
return path
|
||||
|
||||
|
||||
class RmTempTest(unittest.TestCase, ImportHelper, _common.Assertions):
|
||||
class RmTempTest(unittest.TestCase, ImportHelper):
|
||||
"""Tests that temporarily extracted archives are properly removed
|
||||
after usage.
|
||||
"""
|
||||
|
|
@ -1170,9 +1170,7 @@ def match_album_mock(*args, **kwargs):
|
|||
|
||||
|
||||
@patch("beets.autotag.mb.match_album", Mock(side_effect=match_album_mock))
|
||||
class ImportDuplicateAlbumTest(
|
||||
unittest.TestCase, TestHelper, _common.Assertions
|
||||
):
|
||||
class ImportDuplicateAlbumTest(unittest.TestCase, TestHelper):
|
||||
def setUp(self):
|
||||
self.setup_beets()
|
||||
|
||||
|
|
@ -1294,9 +1292,7 @@ def match_track_mock(*args, **kwargs):
|
|||
|
||||
|
||||
@patch("beets.autotag.mb.match_track", Mock(side_effect=match_track_mock))
|
||||
class ImportDuplicateSingletonTest(
|
||||
unittest.TestCase, TestHelper, _common.Assertions
|
||||
):
|
||||
class ImportDuplicateSingletonTest(unittest.TestCase, TestHelper):
|
||||
def setUp(self):
|
||||
self.setup_beets()
|
||||
|
||||
|
|
@ -1650,7 +1646,7 @@ class MultiDiscAlbumsInDirTest(_common.TestCase):
|
|||
self.assertEqual(len(items), 3)
|
||||
|
||||
|
||||
class ReimportTest(unittest.TestCase, ImportHelper, _common.Assertions):
|
||||
class ReimportTest(unittest.TestCase, ImportHelper):
|
||||
"""Test "re-imports", in which the autotagging machinery is used for
|
||||
music that's already in the library.
|
||||
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ class ImportTest(_common.TestCase):
|
|||
|
||||
|
||||
@_common.slow_test()
|
||||
class ConfigTest(unittest.TestCase, TestHelper, _common.Assertions):
|
||||
class ConfigTest(unittest.TestCase, TestHelper):
|
||||
def setUp(self):
|
||||
self.setup_beets()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue