def test_global_artists_differ(self): items = [] items.append(self.item('one', 1)) items.append(self.item('two', 2)) items.append(self.item('three', 3)) info = { 'artist': 'someone else', 'album': 'some album', 'tracks': self.trackinfo(), 'va': False, } self.assertNotEqual(autotag.distance(items, info), 0)
def test_comp_track_artists_do_not_match(self): items = [] items.append(self.item('one', 1)) items.append(self.item('two', 2, 'someone else')) items.append(self.item('three', 3)) info = { 'artist': 'some artist', 'album': 'some album', 'tracks': self.trackinfo(), 'va': True, } self.assertNotEqual(autotag.distance(items, info), 0)
def test_identical_albums(self): items = [] items.append(self.item('one', 1)) items.append(self.item('two', 2)) items.append(self.item('three', 3)) info = { 'artist': 'some artist', 'album': 'some album', 'tracks': self.trackinfo(), 'va': False, } self.assertEqual(autotag.distance(items, info), 0)
def test_comp_track_artists_match(self): items = [] items.append(self.item('one', 1)) items.append(self.item('two', 2)) items.append(self.item('three', 3)) info = { 'artist': 'should be ignored', 'album': 'some album', 'tracks': self.trackinfo(), 'va': True, } self.assertEqual(autotag.distance(items, info), 0)
def test_comp_no_track_artists(self): # Some VA releases don't have track artists (incomplete metadata). items = [] items.append(self.item('one', 1)) items.append(self.item('two', 2)) items.append(self.item('three', 3)) info = { 'artist': 'should be ignored', 'album': 'some album', 'tracks': self.trackinfo(), 'va': True, } del info['tracks'][0]['artist'] del info['tracks'][1]['artist'] del info['tracks'][2]['artist'] self.assertEqual(autotag.distance(items, info), 0)