Skip to content

Commit

Permalink
Add test for python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Oct 4, 2024
1 parent 0c62de1 commit 40014d0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/podio/test_Frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ def test_frame_put_parameters(self):
frame.put_parameter("float_as_float", 3.14, as_type="float")
self.assertAlmostEqual(frame.get_parameter("float_as_float"), 3.14, places=5)

def test_frame_empty_parameters(self):
"""Check that working with empty parameters works"""
frame = Frame()
frame.put_parameter("empty_param", [], as_type="int")
vals = frame.get_parameter("empty_param")
self.assertEqual(len(vals), 0)


class FrameReadTest(unittest.TestCase):
"""Unit tests for the Frame python bindings for Frames read from file.
Expand Down

0 comments on commit 40014d0

Please sign in to comment.