Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Jan 15, 2024
1 parent 5102602 commit 1249a0d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/curies/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Reference,
ReferenceTuple,
chain,
clean_prefix_map,
load_extended_prefix_map,
load_jsonld_context,
load_prefix_map,
Expand Down Expand Up @@ -42,6 +43,7 @@
"remap_curie_prefixes",
"remap_uri_prefixes",
"rewire",
"clean_prefix_map",
"get_version",
# i/o
"load_prefix_map",
Expand Down
11 changes: 9 additions & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,14 @@ class TestUtils(unittest.TestCase):

def test_clean(self):
"""Test clean."""
prefix_map = {"a": "https://example.com/", "b": "https://example.com/"}
prefix_map = {
"a": "https://example.com/a/",
"b": "https://example.com/a/",
"c": "https://example.com/c/",
}
records = clean_prefix_map(prefix_map)
self.assertEqual(1, len(records))
self.assertEqual(2, len(records))
self.assertEqual("a", records[0].prefix)
self.assertEqual(["b"], records[0].prefix_synonyms)
self.assertEqual("https://example.com/a/", records[0].uri_prefix)
self.assertEqual([], records[0].uri_prefix_synonyms)

0 comments on commit 1249a0d

Please sign in to comment.