예제 #1
0
파일: test_art.py 프로젝트: dreewoo/beets
 def test_precedence_amongst_correct_files(self):
     _common.touch(os.path.join(self.dpath, 'back.jpg'))
     _common.touch(os.path.join(self.dpath, 'front.jpg'))
     _common.touch(os.path.join(self.dpath, 'front-cover.jpg'))
     fn = fetchart.art_in_path(self.dpath,
                               ('cover', 'front', 'back'), False)
     self.assertEqual(fn, os.path.join(self.dpath, 'front-cover.jpg'))
예제 #2
0
파일: test_art.py 프로젝트: zhang-xun/beets
 def test_precedence_amongst_correct_files(self):
     _common.touch(os.path.join(self.dpath, 'back.jpg'))
     _common.touch(os.path.join(self.dpath, 'front.jpg'))
     _common.touch(os.path.join(self.dpath, 'front-cover.jpg'))
     fn = fetchart.art_in_path(self.dpath, ('cover', 'front', 'back'),
                               False)
     self.assertEqual(fn, os.path.join(self.dpath, 'front-cover.jpg'))
예제 #3
0
파일: test_art.py 프로젝트: Lugoues/beets
 def test_non_image_file_not_identified(self):
     _common.touch(os.path.join(self.dpath, 'a.txt'))
     fn = fetchart.art_in_path(self.dpath)
     self.assertEqual(fn, None)
예제 #4
0
파일: test_art.py 프로젝트: Lugoues/beets
 def test_appropriately_named_file_takes_precedence(self):
     _common.touch(os.path.join(self.dpath, 'a.jpg'))
     _common.touch(os.path.join(self.dpath, 'cover.jpg'))
     fn = fetchart.art_in_path(self.dpath)
     self.assertEqual(fn, os.path.join(self.dpath, 'cover.jpg'))
예제 #5
0
파일: test_art.py 프로젝트: Lugoues/beets
 def test_finds_jpg_in_directory(self):
     _common.touch(os.path.join(self.dpath, 'a.jpg'))
     fn = fetchart.art_in_path(self.dpath)
     self.assertEqual(fn, os.path.join(self.dpath, 'a.jpg'))
예제 #6
0
파일: test_art.py 프로젝트: zhang-xun/beets
 def test_empty_dir(self):
     fn = fetchart.art_in_path(self.dpath, ('art', ), True)
     self.assertEqual(fn, None)
예제 #7
0
파일: test_art.py 프로젝트: zhang-xun/beets
 def test_cautious_skips_fallback(self):
     _common.touch(os.path.join(self.dpath, 'a.jpg'))
     fn = fetchart.art_in_path(self.dpath, ('art', ), True)
     self.assertEqual(fn, None)
예제 #8
0
파일: test_art.py 프로젝트: msabramo/beets
 def test_non_image_file_not_identified(self):
     _common.touch(os.path.join(self.dpath, 'a.txt'))
     fn = fetchart.art_in_path(self.dpath)
     self.assertEqual(fn, None)
예제 #9
0
파일: test_art.py 프로젝트: msabramo/beets
 def test_appropriately_named_file_takes_precedence(self):
     _common.touch(os.path.join(self.dpath, 'a.jpg'))
     _common.touch(os.path.join(self.dpath, 'cover.jpg'))
     fn = fetchart.art_in_path(self.dpath)
     self.assertEqual(fn, os.path.join(self.dpath, 'cover.jpg'))
예제 #10
0
파일: test_art.py 프로젝트: msabramo/beets
 def test_finds_jpg_in_directory(self):
     _common.touch(os.path.join(self.dpath, 'a.jpg'))
     fn = fetchart.art_in_path(self.dpath)
     self.assertEqual(fn, os.path.join(self.dpath, 'a.jpg'))
예제 #11
0
파일: test_art.py 프로젝트: SUTJael/beets
 def test_empty_dir(self):
     fn = fetchart.art_in_path(self.dpath, ('art',), True)
     self.assertEqual(fn, None)
예제 #12
0
파일: test_art.py 프로젝트: SUTJael/beets
 def test_cautious_skips_fallback(self):
     _common.touch(os.path.join(self.dpath, 'a.jpg'))
     fn = fetchart.art_in_path(self.dpath, ('art',), True)
     self.assertEqual(fn, None)