We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20bdf0d commit 8e2a5b4Copy full SHA for 8e2a5b4
python/podio/test_Frame.py
@@ -152,6 +152,20 @@ def test_frame_empty_parameters(self):
152
vals = frame.get_parameter("empty_param")
153
self.assertEqual(len(vals), 0)
154
155
+ def test_frame_get_collection_from_object(self):
156
+ """Check that using an object (handle) to get a collection works"""
157
+ frame = Frame()
158
+ hits = ExampleHitCollection()
159
+ hit = hits.create()
160
+
161
+ with self.assertRaises(ReferenceError):
162
+ invalidHits = frame.get(hit)
163
+ _ = invalidHits[0]
164
165
+ hits = frame.put(hits, "hits")
166
+ hitsFromHit = frame.get(hit)
167
+ self.assertEqual(hit, hitsFromHit[0])
168
169
170
class FrameReadTest(unittest.TestCase):
171
"""Unit tests for the Frame python bindings for Frames read from file.
0 commit comments