コード例 #1
0
ファイル: test_art.py プロジェクト: navinpai/beets
 def test_non_image_file_not_identified(self):
     _common.touch(os.path.join(self.dpath, 'a.txt'))
     fn = art.art_in_path(self.dpath)
     self.assertEqual(fn, None)
コード例 #2
0
ファイル: test_art.py プロジェクト: navinpai/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 = art.art_in_path(self.dpath)
     self.assertEqual(fn, os.path.join(self.dpath, 'cover.jpg'))
コード例 #3
0
ファイル: test_art.py プロジェクト: navinpai/beets
 def test_finds_jpg_in_directory(self):
     _common.touch(os.path.join(self.dpath, 'a.jpg'))
     fn = art.art_in_path(self.dpath)
     self.assertEqual(fn, os.path.join(self.dpath, 'a.jpg'))
コード例 #4
0
 def test_non_image_file_not_identified(self):
     _common.touch(os.path.join(self.dpath, 'a.txt'))
     fn = art.art_in_path(self.dpath)
     self.assertEqual(fn, None)
コード例 #5
0
 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 = art.art_in_path(self.dpath)
     self.assertEqual(fn, os.path.join(self.dpath, 'cover.jpg'))
コード例 #6
0
 def test_finds_jpg_in_directory(self):
     _common.touch(os.path.join(self.dpath, 'a.jpg'))
     fn = art.art_in_path(self.dpath)
     self.assertEqual(fn, os.path.join(self.dpath, 'a.jpg'))