summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-01-10 08:32:44 -0700
committerSean Whitton <spwhitton@spwhitton.name>2019-01-26 12:54:11 -0700
commitc8d9e8d54c445d6a9b4fa432d3b058fbd3971eff (patch)
treeba2dbc7c7b91553dc5a6f881d3ecc8d67eab9b7f
parent1e1a8768e729d8512fb9d754a75917ce825af74d (diff)
disable test_docinfo_problems
Needs a test resource whose DFSG status is in doubt. Gbp-Pq: Name disable-test_docinfo_problems.patch
-rw-r--r--tests/test_metadata.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/test_metadata.py b/tests/test_metadata.py
index db54463..9f85f83 100644
--- a/tests/test_metadata.py
+++ b/tests/test_metadata.py
@@ -50,12 +50,6 @@ def trivial(resources):
@pytest.fixture
-def enron1(resources):
- # Has nuls in docinfo, old PDF
- return Pdf.open(resources / 'enron1_gs.pdf')
-
-
-@pytest.fixture
def invalid_creationdate(resources):
# Has nuls in docinfo, old PDF
return Pdf.open(resources / 'invalid_creationdate.pdf')
@@ -320,19 +314,3 @@ def test_remove_attribute_metadata(sandwich):
# Ensure the whole node was deleted
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 &#0;
- with meta:
- with pytest.warns(UserWarning) as warned:
- meta.load_from_docinfo(invalid_creationdate.docinfo)
- assert 'could not be copied' in warned[0].message.args[0]
- with pytest.raises(ValueError):
- meta.load_from_docinfo(invalid_creationdate.docinfo, raise_failure=True)
-
- with pytest.warns(UserWarning) as warned:
- with meta as xmp:
- xmp['xmp:CreateDate'] = 'invalid date'
- assert 'could not be updated' in warned[0].message.args[0]