def test_subclass_assertion_is_false(self, get_inferred_facts, add_facts, inference_init): facts = get_empty_graph() facts.add((URIRef(":Icaro"), RDF.type, URIRef(":Human"))) facts.add((URIRef(":Human"), RDFS.subClassOf, URIRef(":Mortal"))) assertion = cannot_infer(self.UNEXPECTED_FACTS).from_facts(facts) self.assertFalse(assertion.assertion_value)
def test_check_unexpected_facts(self): UNEXPECTED_FACTS = "<http://example.onto/Icaro> a <http://example.onto/Student> ." ONTOLOGY_FILE = "example/db/check_expected_facts/ontology.n3" self.assert_that(cannot_infer(UNEXPECTED_FACTS).from_facts(ONTOLOGY_FILE))