def test_difference(self): larger_graph = get_empty_graph() larger_graph.add((URIRef(":Icaro"), RDF.type, URIRef(":Mortal"))) larger_graph.add((URIRef(":Mortal"), RDF.type, OWL.Class)) larger_graph.add((URIRef(":Human"), RDF.type, OWL.Class)) subset_graph = get_empty_graph() subset_graph.add((URIRef(":Icaro"), RDF.type, URIRef(":Mortal"))) self.assertTrue(is_empty_graph(difference(subset_graph, larger_graph)))
def test_is_not_empty_graph(self): graph = get_empty_graph() graph.add((URIRef(":Icaro"), RDF.type, URIRef(":Mortal"))) self.assertFalse(is_empty_graph(graph))
def test_is_empty_graph(self): graph = get_empty_graph() self.assertTrue(is_empty_graph(graph))