Skip to content

Commit 85d8002

Browse files
committed
test: fix tests according curie specification
According the CURIE syntax specification [1] "The prefix is separated from the reference by a colon (:). It is possible to omit both the prefix and the colon [...]." But a test case existed expecting a CURIE omitting both prefix and colon to be invalid. This patch fixes this wrong expectation. [1]: https://www.w3.org/TR/curie/#s_syntax Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
1 parent 0756a6c commit 85d8002

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/test_utils/test_metamodelcore.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ def test_uriorcuries(self):
7070
def test_curie(self):
7171
"""Test the CURIE type"""
7272
self.assertEqual("rdf:type", Curie("rdf:type"))
73-
with self.assertRaises(ValueError):
74-
Curie("type")
75-
self.assertFalse(Curie.is_valid("type"))
73+
self.assertTrue(Curie.is_valid("type"))
7674
self.assertEqual(":type", Curie(":type"))
7775
self.assertTrue(Curie.is_valid(":type"))
7876
self.assertTrue(Curie.is_valid("WIKIDATA_PROPERTY:P854"))

0 commit comments

Comments
 (0)