Add test for minimal 'blank' tag_cache
This commit is contained in:
parent
9e798916bd
commit
b84c9e3eff
10
tests/data/blank_tag_cache
Normal file
10
tests/data/blank_tag_cache
Normal file
@ -0,0 +1,10 @@
|
||||
info_begin
|
||||
mpd_version: 0.14.2
|
||||
fs_charset: UTF-8
|
||||
info_end
|
||||
songList begin
|
||||
key: song1.mp3
|
||||
file: /song1.mp3
|
||||
Time: 4
|
||||
mtime: 1272319626
|
||||
songList end
|
||||
@ -108,3 +108,14 @@ class MPDTagCacheToTracksTest(unittest.TestCase):
|
||||
def test_misencoded_cache(self):
|
||||
# FIXME not sure if this can happen
|
||||
raise SkipTest
|
||||
|
||||
def test_cache_with_blank_track_info(self):
|
||||
tracks, artists, albums = parse_mpd_tag_cache(data_folder('blank_tag_cache'),
|
||||
data_folder(''))
|
||||
|
||||
uri = 'file://' + urllib.pathname2url(data_folder('song1.mp3'))
|
||||
|
||||
self.assertEqual(set([Track(uri=uri, length=4000)]), tracks)
|
||||
self.assertEqual(set(), artists)
|
||||
self.assertEqual(set(), albums)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user