Skip to content

Commit 8c722b6

Browse files
committed
test: improve coverage of curie validation
Issue linkml/linkml#1701 has discovered an erroneous validation of CURIE prefixes, since apparently it doesn't accept characters '_' and '.'. This patch extends the tests to provide test coverage for the expected values to work, avoiding future regressions. Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
1 parent 1feeb08 commit 8c722b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_utils/test_metamodelcore.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def test_curie(self):
6464
self.assertFalse(Curie.is_valid("type"))
6565
self.assertEqual(":type", Curie(":type"))
6666
self.assertTrue(Curie.is_valid(':type'))
67+
self.assertTrue(Curie.is_valid('WIKIDATA_PROPERTY:P854'))
68+
self.assertTrue(Curie.is_valid('WIKIDATA.PROPERTY:P854'))
6769
with self.assertRaises(ValueError):
6870
Curie("1df:type")
6971
self.assertFalse(Curie.is_valid('1df:type'))

0 commit comments

Comments
 (0)