Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Bartley committed Oct 16, 2023
1 parent dce93f0 commit 1929965
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sbol3/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def resolve_references(x):
references.append(new_obj)

return resolve_references


# Global store for builder methods. Custom SBOL classes
# register their builders in this store
Expand Down
2 changes: 1 addition & 1 deletion sbol3/toplevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def reset_references(x):
stub = SBOLObject(o.identity)
stub._references = o._references.copy()
updated_objects.append(stub)
x._referenced_objects[property_id] = updated_objects
x._referenced_objects[property_id] = updated_objects

clone.traverse(reset_references)
clone._references = [SBOLObject(r.identity) for r in self._references]
Expand Down
9 changes: 4 additions & 5 deletions test/test_referenced_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def test_copy(self):
# When the Component is copied to a new document,
# its reference to the Model should be upcast as
# since it becomes a reference to an external object
#component_copy = component.copy(target_doc=doc2)
[component_copy] = sbol3.copy([component], into_document=doc2)
self.assertEqual(len(doc2.objects), 1)
model_copy = component_copy.models[0]
Expand Down Expand Up @@ -103,14 +102,14 @@ def test_copy_in_different_order(self):
component.identity)

model_copy = model.clone()
self.assertEqual(type(model_copy._references[0]),
self.assertEqual(type(model_copy._references[0]),
sbol3.SBOLObject)

[model_copy] = sbol3.copy([model], into_document=doc2)
self.assertEqual(len(doc2.objects), 1)
self.assertEqual(type(model_copy._references[0]),
self.assertEqual(type(model_copy._references[0]),
sbol3.SBOLObject)
self.assertEqual(model_copy._references[0].identity,
self.assertEqual(model_copy._references[0].identity,
component.identity)

[component_copy] = sbol3.copy([component], into_document=doc2)
Expand Down Expand Up @@ -375,7 +374,7 @@ def test_remove(self):
model = component.models[0]
self.assertFalse(type(model) is sbol3.Model)
self.assertTrue(type(model) is sbol3.SBOLObject)


if __name__ == '__main__':
unittest.main()

0 comments on commit 1929965

Please sign in to comment.