Example #1
0
    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)))
Example #2
0
 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))
Example #3
0
 def test_is_empty_graph(self):
     graph = get_empty_graph()
     self.assertTrue(is_empty_graph(graph))