()
| 28 | |
| 29 | |
| 30 | def test_3237(): |
| 31 | filename = os.path.abspath(f'{__file__}/../../tests/resources/001003ED.pdf') |
| 32 | with pymupdf.open(filename) as doc: |
| 33 | # We need to explicitly encode in utf8 on windows. |
| 34 | metadata1 = doc.metadata |
| 35 | metadata1 = repr(metadata1).encode('utf8') |
| 36 | doc.set_metadata({}) |
| 37 | |
| 38 | metadata2 = doc.metadata |
| 39 | metadata2 = repr(metadata2).encode('utf8') |
| 40 | print(f'{metadata1=}') |
| 41 | print(f'{metadata2=}') |
| 42 | assert metadata1 == b'{\'format\': \'PDF 1.6\', \'title\': \'RUBRIK_Editorial_01-06.indd\', \'author\': \'Natalie Schaefer\', \'subject\': \'\', \'keywords\': \'\', \'creator\': \'\', \'producer\': \'Acrobat Distiller 7.0.5 (Windows)\', \'creationDate\': "D:20070113191400+01\'00\'", \'modDate\': "D:20070120104154+01\'00\'", \'trapped\': \'\', \'encryption\': None}' |
| 43 | assert metadata2 == b"{'format': 'PDF 1.6', 'title': '', 'author': '', 'subject': '', 'keywords': '', 'creator': '', 'producer': '', 'creationDate': '', 'modDate': '', 'trapped': '', 'encryption': None}" |
nothing calls this directly
no test coverage detected
searching dependent graphs…