diff options
Diffstat (limited to 'mapreduce/tests/test_grobid2json.py')
-rw-r--r-- | mapreduce/tests/test_grobid2json.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/mapreduce/tests/test_grobid2json.py b/mapreduce/tests/test_grobid2json.py deleted file mode 100644 index 8497b10..0000000 --- a/mapreduce/tests/test_grobid2json.py +++ /dev/null @@ -1,22 +0,0 @@ - -import xml -import json -import pytest -from grobid2json import * - - -def test_small_xml(): - - with open('tests/files/small.xml', 'r') as f: - tei_xml = f.read() - with open('tests/files/small.json', 'r') as f: - json_form = json.loads(f.read()) - - assert teixml2json(tei_xml) == json_form - -def test_invalid_xml(): - - with pytest.raises(xml.etree.ElementTree.ParseError): - teixml2json("this is not XML") - with pytest.raises(ValueError): - teixml2json("<xml></xml>") |