Skip to content

Commit

Permalink
adding dynamic enum and ucum to test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Jul 14, 2022
1 parent 118714c commit 2a46c65
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_utils/input/kitchen_sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,19 @@ enums:
meaning: tax:02
HUMAN:
is_a: MAMMAL
HCAExample:
see_also:
- https://github.com/linkml/linkml/issues/274
include:
- reachable_from:
source_ontology: bioregistry:go
source_nodes:
- GO:0007049
- GO:0022403
include_self: false
relationship_types:
- rdfs:subClassOf
minus:
concepts:
- LOINC:5932-9

10 changes: 10 additions & 0 deletions tests/test_utils/test_schemaview.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,16 @@ def test_imports(self):

assert view.get_uri('string') == 'xsd:string'

# dynamic enums
e = view.get_enum('HCAExample')
self.assertCountEqual(['GO:0007049',
'GO:0022403'],
e.include[0].reachable_from.source_nodes)

# units
height = view.get_slot('height_in_m')
self.assertEqual("m", height.unit.ucum_code)

def test_merge_imports(self):
"""
ensure merging and merging imports closure works
Expand Down

0 comments on commit 2a46c65

Please sign in to comment.