diff options
Diffstat (limited to 'debian/patches/disable-test_docinfo_problems.patch')
-rw-r--r-- | debian/patches/disable-test_docinfo_problems.patch | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/debian/patches/disable-test_docinfo_problems.patch b/debian/patches/disable-test_docinfo_problems.patch index a69ca9a..fdcd1fa 100644 --- a/debian/patches/disable-test_docinfo_problems.patch +++ b/debian/patches/disable-test_docinfo_problems.patch @@ -9,7 +9,7 @@ Needs a test resource whose DFSG status is in doubt. --- a/tests/test_metadata.py +++ b/tests/test_metadata.py -@@ -50,12 +50,6 @@ def trivial(resources): +@@ -58,12 +58,6 @@ def trivial(resources): @pytest.fixture @@ -22,12 +22,10 @@ Needs a test resource whose DFSG status is in doubt. def invalid_creationdate(resources): # Has nuls in docinfo, old PDF return Pdf.open(resources / 'invalid_creationdate.pdf') -@@ -320,34 +314,6 @@ def test_remove_attribute_metadata(sandw - - # Ensure the whole node was deleted +@@ -337,37 +331,6 @@ def test_remove_attribute_metadata(sandw assert not re.search(r'rdf:Description xmlns:[^\s]+ rdf:about=""/', str(xmp)) -- -- + + -def test_docinfo_problems(enron1, invalid_creationdate): - meta = enron1.open_metadata() - meta._load() # File has invalid XML sequence � @@ -45,15 +43,20 @@ Needs a test resource whose DFSG status is in doubt. - - -def test_wrong_xml(enron1): -- enron1.Root.Metadata = Stream(enron1, b""" +- enron1.Root.Metadata = Stream( +- enron1, +- b""" - <test><xml>This is valid xml but not valid XMP</xml></test> -- """.strip()) +- """.strip(), +- ) - meta = enron1.open_metadata() -- with pytest.raises(ValueError, message='not XMP'): +- with pytest.raises(ValueError, match='not XMP'): - with meta: - pass -- with pytest.raises(ValueError, message='not XMP'): +- with pytest.raises(ValueError, match='not XMP'): - meta['pdfaid:part'] - - +- +- def test_no_x_xmpmeta(trivial): + trivial.Root.Metadata = Stream( + trivial, |