diff --git a/sbol2/property.py b/sbol2/property.py index e5536e6..5674c83 100644 --- a/sbol2/property.py +++ b/sbol2/property.py @@ -935,9 +935,8 @@ def __init__(self, property_owner, type_uri, reference_type_uri, super().__init__(property_owner, type_uri, lower_bound, upper_bound, validation_rules, initial_value) self.reference_type_uri = reference_type_uri - if self._sbol_owner is None: - property_store = [] - self._sbol_owner.properties[type_uri] = property_store + property_store = [] + self._sbol_owner.properties[type_uri] = property_store def get(self, item): """Return reference object at this index. diff --git a/test/test_participation.py b/test/test_participation.py index 3ad5625..6d68715 100644 --- a/test/test_participation.py +++ b/test/test_participation.py @@ -17,7 +17,6 @@ def test_add_remove_role(self): self.assertEqual([sbol2.SO_PROMOTER, sbol2.SO_CDS], p.roles) def test_init_with_participant(self): - p = sbol2.Participation('p', participant='p1') self.assertEqual('p1', p.participant) diff --git a/test/test_style.py b/test/test_style.py index bf687ed..1999f0a 100644 --- a/test/test_style.py +++ b/test/test_style.py @@ -49,7 +49,7 @@ def test_wildcard_imports(self): if 'import' in line: if '*' in line and 'constants' not in line: msg = 'Wildcard import in {}: {}' - msg = msg.format(f, line) + _ = msg.format(f, line) # self.fail(msg) # print(msg) wildcard_count += 1