mirror of
https://github.com/beetbox/beets.git
synced 2025-12-22 08:34:23 +01:00
Fix overlength lines
This commit is contained in:
parent
d808316b23
commit
92d008b155
2 changed files with 13 additions and 7 deletions
|
|
@ -1766,8 +1766,10 @@ def mocked_get_recording_by_id(id_, includes=[], release_status=[],
|
|||
}
|
||||
|
||||
|
||||
@patch('musicbrainzngs.get_recording_by_id', Mock(side_effect=mocked_get_recording_by_id))
|
||||
@patch('musicbrainzngs.get_release_by_id', Mock(side_effect=mocked_get_release_by_id))
|
||||
@patch('musicbrainzngs.get_recording_by_id',
|
||||
Mock(side_effect=mocked_get_recording_by_id))
|
||||
@patch('musicbrainzngs.get_release_by_id',
|
||||
Mock(side_effect=mocked_get_release_by_id))
|
||||
class ImportMusicBrainzIdTest(_common.TestCase, ImportHelper):
|
||||
"""Test the --musicbrainzid argument."""
|
||||
|
||||
|
|
@ -1850,6 +1852,7 @@ class ImportMusicBrainzIdTest(_common.TestCase, ImportHelper):
|
|||
self.assertEqual(set(['VALID_RECORDING_0', 'VALID_RECORDING_1']),
|
||||
set([c.info.title for c in task.candidates]))
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromName(__name__)
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ class PlayPluginTest(unittest.TestCase, TestHelper):
|
|||
self.teardown_beets()
|
||||
self.unload_plugins()
|
||||
|
||||
def do_test(self, open_mock, args=('title:aNiceTitle',), expected_cmd='echo',
|
||||
expected_playlist=None):
|
||||
def do_test(self, open_mock, args=('title:aNiceTitle',),
|
||||
expected_cmd='echo', expected_playlist=None):
|
||||
self.run_command('play', *args)
|
||||
|
||||
open_mock.assert_called_once_with(ANY, expected_cmd)
|
||||
|
|
@ -58,12 +58,14 @@ class PlayPluginTest(unittest.TestCase, TestHelper):
|
|||
self.do_test(open_mock, [u'-a', u'nice'])
|
||||
|
||||
def test_args_option(self, open_mock):
|
||||
self.do_test(open_mock, [u'-A', u'foo', u'title:aNiceTitle'], u'echo foo')
|
||||
self.do_test(open_mock,
|
||||
[u'-A', u'foo', u'title:aNiceTitle'], u'echo foo')
|
||||
|
||||
def test_args_option_in_middle(self, open_mock):
|
||||
self.config['play']['command'] = 'echo $args other'
|
||||
|
||||
self.do_test(open_mock, [u'-A', u'foo', u'title:aNiceTitle'], u'echo foo other')
|
||||
self.do_test(open_mock,
|
||||
[u'-A', u'foo', u'title:aNiceTitle'], u'echo foo other')
|
||||
|
||||
def test_relative_to(self, open_mock):
|
||||
self.config['play']['command'] = 'echo'
|
||||
|
|
@ -71,7 +73,8 @@ class PlayPluginTest(unittest.TestCase, TestHelper):
|
|||
|
||||
path = os.path.relpath(self.item.path, b'/something')
|
||||
playlist = path.decode('utf8')
|
||||
self.do_test(open_mock, expected_cmd='echo', expected_playlist=playlist)
|
||||
self.do_test(open_mock,
|
||||
expected_cmd='echo', expected_playlist=playlist)
|
||||
|
||||
def test_use_folders(self, open_mock):
|
||||
self.config['play']['command'] = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue