mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 02:52:33 +01:00
test: Split up playlist test helper class
This commit is contained in:
parent
6d42028057
commit
1af82cc450
1 changed files with 5 additions and 3 deletions
|
|
@ -79,6 +79,8 @@ class PlaylistTestHelper(helper.TestHelper):
|
|||
shutil.rmtree(self.playlist_dir)
|
||||
self.teardown_beets()
|
||||
|
||||
|
||||
class PlaylistQueryTestHelper(PlaylistTestHelper):
|
||||
def test_name_query_with_absolute_paths_in_playlist(self):
|
||||
q = u'playlist:absolute'
|
||||
results = self.lib.items(q)
|
||||
|
|
@ -132,7 +134,7 @@ class PlaylistTestHelper(helper.TestHelper):
|
|||
self.assertEqual(set(results), set())
|
||||
|
||||
|
||||
class PlaylistTestRelativeToLib(PlaylistTestHelper, unittest.TestCase):
|
||||
class PlaylistTestRelativeToLib(PlaylistQueryTestHelper, unittest.TestCase):
|
||||
def setup_test(self):
|
||||
with open(os.path.join(self.playlist_dir, 'absolute.m3u'), 'w') as f:
|
||||
f.write('{0}\n'.format(os.path.join(
|
||||
|
|
@ -150,7 +152,7 @@ class PlaylistTestRelativeToLib(PlaylistTestHelper, unittest.TestCase):
|
|||
self.config['playlist']['relative_to'] = 'library'
|
||||
|
||||
|
||||
class PlaylistTestRelativeToDir(PlaylistTestHelper, unittest.TestCase):
|
||||
class PlaylistTestRelativeToDir(PlaylistQueryTestHelper, unittest.TestCase):
|
||||
def setup_test(self):
|
||||
with open(os.path.join(self.playlist_dir, 'absolute.m3u'), 'w') as f:
|
||||
f.write('{0}\n'.format(os.path.join(
|
||||
|
|
@ -168,7 +170,7 @@ class PlaylistTestRelativeToDir(PlaylistTestHelper, unittest.TestCase):
|
|||
self.config['playlist']['relative_to'] = self.music_dir
|
||||
|
||||
|
||||
class PlaylistTestRelativeToPls(PlaylistTestHelper, unittest.TestCase):
|
||||
class PlaylistTestRelativeToPls(PlaylistQueryTestHelper, unittest.TestCase):
|
||||
def setup_test(self):
|
||||
with open(os.path.join(self.playlist_dir, 'absolute.m3u'), 'w') as f:
|
||||
f.write('{0}\n'.format(os.path.join(
|
||||
|
|
|
|||
Loading…
Reference in a new issue