Esempio n. 1
0
 def test_image_embed_and_extract__mp4(self):
     target = os.path.join(td.TEMP_DIR, "test_write_image.m4a")
     shutil.copy(td.M4A_PATH, target)
     img = audiofile.load_folder_art(td.FLAC_PATH, "cover.jpg")
     af = audiofile.open(target)
     af.embed_cover(img)
     af.flush()
     af = audiofile.open(target)
     self.assertTrue(af.has_embedded_cover)
     self.assertEquals(img, audiofile.open(target).extract_cover())
Esempio n. 2
0
 def test_read_folder_image(self):
     img = audiofile.load_folder_art(td.FLAC_PATH, filename='cover.jpg')
     self.assertEquals( open(td.COVER_PATH).read(), img.bytes )