From 92d008b1550f07be5aff091409b924f6928bf737 Mon Sep 17 00:00:00 2001 From: Jesse Weinstein Date: Sun, 24 Jul 2016 12:11:35 -0700 Subject: [PATCH] Fix overlength lines --- test/test_importer.py | 7 +++++-- test/test_play.py | 13 ++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/test/test_importer.py b/test/test_importer.py index 21f3c2601..37550263b 100644 --- a/test/test_importer.py +++ b/test/test_importer.py @@ -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__) diff --git a/test/test_play.py b/test/test_play.py index 1fbcb6ae4..d250d08bb 100644 --- a/test/test_play.py +++ b/test/test_play.py @@ -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