From 21dd60df6dd9c98857760ab4d7fdec3c3d2c6d88 Mon Sep 17 00:00:00 2001 From: Zineb Aly <zaly@km3net.de> Date: Tue, 29 Sep 2020 22:43:28 +0200 Subject: [PATCH] test raise KeyError --- tests/test_tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_tools.py b/tests/test_tools.py index ab6bbdb..2bd8984 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -89,6 +89,10 @@ class TestBestTrack(unittest.TestCase): with self.assertRaises(ValueError): best_track(events.tracks, strategy="Zineb") + # test raising KeyError + with self.assertRaises(KeyError): + best_track(events.tracks) + class TestGetMultiplicity(unittest.TestCase): def test_get_multiplicity(self): -- GitLab