From 40014d004b83bc67d625599e481d9e1bc6920ac0 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Fri, 4 Oct 2024 15:51:39 +0200 Subject: [PATCH] Add test for python bindings --- python/podio/test_Frame.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/podio/test_Frame.py b/python/podio/test_Frame.py index b28a5b105..77373dcf6 100644 --- a/python/podio/test_Frame.py +++ b/python/podio/test_Frame.py @@ -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.