From 0bf5ce8c991e6dc766593495b3c357b101de1b9b Mon Sep 17 00:00:00 2001 From: Manuel Lera Ramirez Date: Thu, 11 Apr 2024 11:19:14 +0100 Subject: [PATCH] closes #430 --- sbol2/property.py | 2 +- test/test_participation.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sbol2/property.py b/sbol2/property.py index 1ae1efb..e5536e6 100644 --- a/sbol2/property.py +++ b/sbol2/property.py @@ -935,7 +935,7 @@ 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 not None: + if self._sbol_owner is None: property_store = [] self._sbol_owner.properties[type_uri] = property_store diff --git a/test/test_participation.py b/test/test_participation.py index c8f8b1f..3ad5625 100644 --- a/test/test_participation.py +++ b/test/test_participation.py @@ -16,6 +16,11 @@ def test_add_remove_role(self): p.removeRole(1) 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) + if __name__ == '__main__': unittest.main()