1
0
Fork 0
mirror of synced 2025-07-04 04:17:29 +02:00

Significantly improve portability

This commit is contained in:
jvoisin 2025-01-09 01:21:31 +01:00
parent 70d236a062
commit 6c966f2afa
4 changed files with 18 additions and 7 deletions

View file

@ -508,8 +508,11 @@ class TestCleaning(unittest.TestCase):
'TrackID': 1,
'TrackLayer': 0,
'TransferCharacteristics': 'BT.709',
'VideoFullRangeFlag': 0,
'VideoFullRangeFlag': 'Limited',
},
'extra_expected_meta': {
'VideoFullRangeFlag': 0,
}
},{
'name': 'wmv',
'ffmpeg': 1,
@ -522,7 +525,10 @@ class TestCleaning(unittest.TestCase):
'name': 'heic',
'parser': images.HEICParser,
'meta': {},
'expected_meta': {},
'expected_meta': {
'ExifByteOrder': 'Big-endian (Motorola, MM)',
'Warning': 'Bad IFD0 directory',
},
}
]
@ -558,7 +564,12 @@ class TestCleaning(unittest.TestCase):
if meta:
for k, v in p2.get_meta().items():
self.assertIn(k, case['expected_meta'], '"%s" is not in "%s" (%s)' % (k, case['expected_meta'], case['name']))
self.assertIn(str(case['expected_meta'][k]), str(v))
if str(case['expected_meta'][k]) in str(v):
continue
if 'extra_expected_meta' in case and k in case['extra_expected_meta']:
if str(case['extra_expected_meta'][k]) in str(v):
continue
self.assertTrue(False, "got a different value (%s) than excepted (%s) for %s" % (str(v), meta, k))
self.assertTrue(p2.remove_all())
os.remove(target)