Update test for the new DefinedNamespace namespaces. Remove sh:example in test as it does not exist. Instead, add in sh:Info.
@@ -4,7 +4,7 @@ from io import StringIO
from warnings import warn
from rdflib.graph import Graph
-from rdflib.namespace import Namespace, FOAF, RDF, RDFS, SH
+from rdflib.namespace import FOAF, RDF, RDFS, SH, DefinedNamespaceMeta
from rdflib.term import URIRef
@@ -142,9 +142,9 @@ class NamespacePrefixTest(unittest.TestCase):
def test_contains_method(self):
"""Tests for Namespace.__contains__() methods."""
- ref = URIRef('http://www.w3.org/ns/shacl#example')
- self.assertTrue(type(SH) == Namespace, "SH no longer a Namespace, update test.")
- self.assertTrue(ref in SH, "sh:example not in SH")
+ ref = URIRef('http://www.w3.org/ns/shacl#Info')
+ self.assertTrue(type(SH) == DefinedNamespaceMeta, f"SH no longer a DefinedNamespaceMeta (instead it is now {type(SH)}, update test.")
+ self.assertTrue(ref in SH, "sh:Info not in SH")
ref = URIRef('http://www.w3.org/2000/01/rdf-schema#label')
self.assertTrue(ref in RDFS, "ClosedNamespace(RDFS) does not include rdfs:label")
