aboutsummaryrefslogtreecommitdiffstats
path: root/mapreduce/tests/test_grobid2json.py
blob: 40853dd1b7229651e3e1f1bc4db1b3e259f74eb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

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