cc-4226: fixed empty fields to be shown as empty strings instead of placeholder unknown. updated tests

This commit is contained in:
Rudi Grinberg 2012-08-15 12:02:51 -04:00
parent 76eaae62f0
commit 71b62608e5
3 changed files with 33 additions and 17 deletions

View file

@ -60,4 +60,11 @@ class TestMMP(unittest.TestCase):
self.assertRaises( ValueError, lambda : mmp.file_md5('/bull/shit/path') )
self.assertTrue( m1 == mmp.file_md5(p) )
def test_sub_path(self):
f1 = "/home/testing/123.mp3"
d1 = "/home/testing"
d2 = "/home/testing/"
self.assertTrue( mmp.sub_path(d1, f1) )
self.assertTrue( mmp.sub_path(d2, f1) )
if __name__ == '__main__': unittest.main()