From 5909c9ee89725de02176f5b9c8424b0b0cddb26a Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 21 Jun 2016 15:02:05 -0700 Subject: [PATCH] Fix #2051: don't try to sort None I found the point in the test harnesses where None was introduced as a value for `TrackInfo.index`. Just using zero works fine. --- test/test_importer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/test_importer.py b/test/test_importer.py index 93a034ee6..a1b0cd895 100644 --- a/test/test_importer.py +++ b/test/test_importer.py @@ -98,7 +98,8 @@ class AutotagStub(object): track_id=u'trackid', artist=artist.replace('Tag', 'Applied'), artist_id=u'artistid', - length=1 + length=1, + index=0, ) def album_for_id(self, mbid): @@ -112,7 +113,8 @@ class AutotagStub(object): title=u'Applied Title %d' % number, track_id=u'match %d' % number, artist=artist, - length=1 + length=1, + index=0, ) def _make_album_match(self, artist, album, tracks, distance=0, missing=0): @@ -1072,6 +1074,7 @@ def test_album_info(): track_info = TrackInfo( title=u'new title', track_id=u'trackid', + index=0, ) album_info = AlbumInfo( artist=u'artist', @@ -1189,6 +1192,7 @@ class ImportDuplicateSingletonTest(unittest.TestCase, TestHelper, artist=u'artist', title=u'title', track_id=u'new trackid', + index=0, ) self.match_track.return_value = iter([track_info])