Skip to content

Commit

Permalink
Test automatic list wrapping for Measure
Browse files Browse the repository at this point in the history
  • Loading branch information
tcmitchell committed Feb 11, 2022
1 parent ed476ab commit c0f1d84
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/test_om_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ def test_read_from_file(self):
measure.unit)
self.assertEqual('measure1', measure.display_id)

def test_list_wrapping(self):
# Ensure that at least certain properties handle automatic list
# wrapping and are typed to do so.
# See https://github.com/SynBioDex/pySBOL3/issues/301
sbol3.set_namespace('https://github.com/synbiodex/pysbol3')
unit_uri = 'http://www.ontology-of-units-of-measure.org/resource/om-2/gramPerLitre'
# SBO:0000612 is from the SBOL 3.0.1 specification.
test_type = 'https://identifiers.org/SBO:0000612'
measure1 = sbol3.Measure(value=1.0, unit=unit_uri, types=test_type)
self.assertEqual([test_type], measure1.types)


class TestPrefixedUnit(unittest.TestCase):

Expand Down

0 comments on commit c0f1d84

Please sign in to comment.