Skip to content

Commit eeb3dc2

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 01838a0 commit eeb3dc2

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
@@ -59,9 +59,7 @@ def test_uriorcuries(self):
5959
def test_curie(self):
6060
""" Test the CURIE type """
6161
self.assertEqual("rdf:type", Curie("rdf:type"))
62-
with self.assertRaises(ValueError):
63-
Curie("type")
64-
self.assertFalse(Curie.is_valid("type"))
62+
self.assertTrue(Curie.is_valid("type"))
6563
self.assertEqual(":type", Curie(":type"))
6664
self.assertTrue(Curie.is_valid(':type'))
6765
self.assertTrue(Curie.is_valid('WIKIDATA_PROPERTY:P854'))

0 commit comments

Comments
 (0)