summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_libmat2.py37
1 files changed, 35 insertions, 2 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index 0f7803a..2147ee8 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -536,7 +536,40 @@ class TestCleaning(unittest.TestCase):
536 'parser': images.HEICParser, 536 'parser': images.HEICParser,
537 'meta': {}, 537 'meta': {},
538 'expected_meta': { 538 'expected_meta': {
539 'BlueMatrixColumn': '0.14305 0.06061 0.71393',
540 'BlueTRC': '(Binary data 32 bytes, use -b option to extract)',
541 'CMMFlags': 'Not Embedded, Independent',
542 'ChromaticAdaptation': '1.04788 0.02292 -0.05022 0.02959 0.99048 -0.01707 -0.00925 0.01508 0.75168',
543 'ChromaticityChannel1': '0.64 0.33002',
544 'ChromaticityChannel2': '0.3 0.60001',
545 'ChromaticityChannel3': '0.15001 0.06',
546 'ChromaticityChannels': 3,
547 'ChromaticityColorant': 'Unknown',
548 'ColorSpaceData': 'RGB ',
549 'ConnectionSpaceIlluminant': '0.9642 1 0.82491',
550 'DeviceAttributes': 'Reflective, Glossy, Positive, Color',
551 'DeviceManufacturer': '',
552 'DeviceMfgDesc': 'GIMP',
553 'DeviceModel': '',
554 'DeviceModelDesc': 'sRGB',
539 'ExifByteOrder': 'Big-endian (Motorola, MM)', 555 'ExifByteOrder': 'Big-endian (Motorola, MM)',
556 'GreenMatrixColumn': '0.38512 0.7169 0.09706',
557 'GreenTRC': '(Binary data 32 bytes, use -b option to extract)',
558 'MediaWhitePoint': '0.9642 1 0.82491',
559 'PrimaryPlatform': 'Apple Computer Inc.',
560 'ProfileCMMType': 'Little CMS',
561 'ProfileClass': 'Display Device Profile',
562 'ProfileConnectionSpace': 'XYZ ',
563 'ProfileCopyright': 'Public Domain',
564 'ProfileCreator': 'Little CMS',
565 'ProfileDateTime': '2022:05:15 16:29:22',
566 'ProfileDescription': 'GIMP built-in sRGB',
567 'ProfileFileSignature': 'acsp',
568 'ProfileID': 0,
569 'ProfileVersion': '4.3.0',
570 'RedMatrixColumn': '0.43604 0.22249 0.01392',
571 'RedTRC': '(Binary data 32 bytes, use -b option to extract)',
572 'RenderingIntent': 'Perceptual',
540 'Warning': 'Bad IFD0 directory', 573 'Warning': 'Bad IFD0 directory',
541 }, 574 },
542 } 575 }
@@ -573,13 +606,13 @@ class TestCleaning(unittest.TestCase):
573 meta = p2.get_meta() 606 meta = p2.get_meta()
574 if meta: 607 if meta:
575 for k, v in p2.get_meta().items(): 608 for k, v in p2.get_meta().items():
576 self.assertIn(k, case['expected_meta'], '"%s" is not in "%s" (%s)' % (k, case['expected_meta'], case['name'])) 609 self.assertIn(k, case['expected_meta'], '"%s" is not in "%s" (%s), with all of them being %s' % (k, case['expected_meta'], case['name'], p2.get_meta().items()))
577 if str(case['expected_meta'][k]) in str(v): 610 if str(case['expected_meta'][k]) in str(v):
578 continue 611 continue
579 if 'extra_expected_meta' in case and k in case['extra_expected_meta']: 612 if 'extra_expected_meta' in case and k in case['extra_expected_meta']:
580 if str(case['extra_expected_meta'][k]) in str(v): 613 if str(case['extra_expected_meta'][k]) in str(v):
581 continue 614 continue
582 self.assertTrue(False, "got a different value (%s) than excepted (%s) for %s" % (str(v), meta, k)) 615 self.assertTrue(False, "got a different value (%s) than excepted (%s) for %s, with all of them being %s" % (str(v), meta, k, p2.get_meta().items()))
583 self.assertTrue(p2.remove_all()) 616 self.assertTrue(p2.remove_all())
584 617
585 os.remove(target) 618 os.remove(target)