Example #1
0
def test_load_parse_and_export(data_pool):
    """
    Can we load and parse data, then export it?
    Test passes if we can load, parse and export without
    error, and the exported graph is the same as the one
    stored in the Exporter object.
    """
    fname = tempfile.mktemp()
    expo = Exporter()
    ref = data_pool.get_reference()
    expo.parse(SAMPLE_LOCATION)
    expo.load(ref)
    expo.export(filename=fname)

    current_graph = rdflib.Graph().parse(fname, format='n3')

    assert current_graph.isomorphic(expo.graph)
Example #2
0
def test_load_parse_and_export(data_pool):
    """
    Can we load and parse data, then export it?
    Test passes if we can load, parse and export without
    error, and the exported graph is the same as the one
    stored in the Exporter object.
    """
    fname = tempfile.mktemp()
    expo = Exporter()
    ref = data_pool.get_reference()
    expo.parse(SAMPLE_LOCATION)
    expo.load(ref)
    expo.export(filename=fname)

    current_graph = rdflib.Graph().parse(fname, format='n3')

    assert current_graph.isomorphic(expo.graph)