Fix overlength lines

This commit is contained in:
Jesse Weinstein 2016-07-24 12:11:35 -07:00
parent d808316b23
commit 92d008b155
2 changed files with 13 additions and 7 deletions

View file

@ -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__)

View file

@ -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