From c4064b82e35870c8c9ae20fdafa83837319ecabe Mon Sep 17 00:00:00 2001 From: Ross Armstrong <52817125+rossarmstrong@users.noreply.github.com> Date: Wed, 29 Nov 2023 23:21:57 +1100 Subject: [PATCH] Update unittest for the werp module --- tests/test_werp.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_werp.py b/tests/test_werp.py index 6a5cbb4..46bae71 100644 --- a/tests/test_werp.py +++ b/tests/test_werp.py @@ -125,6 +125,21 @@ def test_werp_example_5(self): self.assertEqual(werp(ref, hyp, 0.5, 0.5, 1), expected_result) + def test_werp_example_6(self): + """ + Test the werp function with numerical reference and hypothesis inputs. + + This test evaluates the WERP function with numerical reference and hypothesis inputs. + It verifies that the numerical input will raise an AttributeError. + + """ + ref = [1, 2, 3, 4] + hyp = [2, 3, 3, 3] + # The actual return value is None from the try/except block in werp module + expected_result = None + + self.assertEqual(werp(ref, hyp, 0.5, 0.5, 1), expected_result) + if __name__ == "__main__": # pragma: no cover unittest.main()