Skip to content

Commit

Permalink
Test prefix maps using bioregistry's epm as reference. (#406)
Browse files Browse the repository at this point in the history
Drafted with @matentzn  over a call.
  • Loading branch information
hrshdhgd committed Aug 7, 2023
1 parent 52e2dbd commit 3faf3b3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_prefixes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""Test for built-in prefixes."""

import unittest

from sssom.context import get_extended_prefix_map, get_jsonld_context


class TestPrefix(unittest.TestCase):
"""A test case for testing prefixes using EPM."""

def test_builtin_prefixes(self):
"""This test ensures that the bioregistry managed EPM (extended prefix-map) does not deviate from the fixed SSSOM built-in prefixes."""
prefix_map = get_extended_prefix_map()
sssom_schema_context = get_jsonld_context()
for k, v in prefix_map.items():
if isinstance(v, str):
if k in sssom_schema_context["@context"]:
self.assertTrue(sssom_schema_context["@context"][k] == v)

0 comments on commit 3faf3b3

Please sign in to comment.