Skip to content

Commit

Permalink
test: improve test coverage
Browse files Browse the repository at this point in the history
Add new tests to improve test coverage.

Remove also unused (and therefore not tested) functionality.

Signed-off-by: Silvano Cirujano Cuesta <[email protected]>
  • Loading branch information
Silvanoc committed Oct 13, 2023
1 parent d9e688c commit b86c1fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
7 changes: 0 additions & 7 deletions linkml_runtime/utils/uri_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,7 @@ def validate_uri_reference(input):
return uri_validator.match(input) or uri_relative_ref_validator.match(input)


def validate_absolute_uri(input):
return abs_uri_validator.match(input)


def validate_curie(input):
# print(CURIE)
return curie_validator.match(input)


def validate_safe_curie(input):
return safe_curie_validator.match(input)
7 changes: 5 additions & 2 deletions tests/test_utils/test_metamodelcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ def test_uriorcuries(self):
URIorCURIE("1:def")
with self.assertRaises(ValueError):
URIorCURIE(" ")
#with self.assertRaises(ValueError):
# URIorCURIE("_")
with self.assertRaises(ValueError):
URIorCURIE("[")
lax()
URIorCURIE("1abc:def")
URIorCURIE("1:def")
self.assertFalse(URIorCURIE.is_valid(123))
URIorCURIE.is_curie("abc:123")
self.assertFalse(URIorCURIE.is_curie("http://example.org/path"))

def test_curie(self):
""" Test the CURIE type """
Expand Down

0 comments on commit b86c1fa

Please sign in to comment.