mirror of
https://github.com/beetbox/beets.git
synced 2026-01-08 17:08:12 +01:00
simple testing for wider_jpeg_detection now done in test_mediafile_edge.py
This commit is contained in:
parent
4b63848d51
commit
b444ec496c
2 changed files with 7 additions and 10 deletions
|
|
@ -53,16 +53,6 @@ class ArtTestMixin(object):
|
|||
return self._jpg_data
|
||||
_jpg_data = None
|
||||
|
||||
@property
|
||||
def jpg_data_only_magic_bytes(self):
|
||||
if not self._jpg_data:
|
||||
with open(
|
||||
os.path.join(_common.RSRC, 'only-magic-bytes.jpg'),
|
||||
'rb') as f:
|
||||
self._jpg_data = f.read()
|
||||
return self._jpg_data
|
||||
_jpg_data = None
|
||||
|
||||
@property
|
||||
def tiff_data(self):
|
||||
if not self._jpg_data:
|
||||
|
|
|
|||
|
|
@ -78,6 +78,13 @@ class EdgeTest(unittest.TestCase):
|
|||
f = beets.mediafile.MediaFile(os.path.join(_common.RSRC, 'oldape.ape'))
|
||||
self.assertEqual(f.bitrate, 0)
|
||||
|
||||
def test_only_magic_bytes_jpeg(self):
|
||||
f = open(os.path.join(_common.RSRC, 'only-magic-bytes.jpg'), 'rb')
|
||||
jpg_data = f.read()
|
||||
self.assertEqual(
|
||||
beets.mediafile._image_mime_type(jpg_data),
|
||||
'image/jpeg')
|
||||
|
||||
|
||||
class InvalidValueToleranceTest(unittest.TestCase):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue