Skip to content

Commit

Permalink
Update unittest for the werp module
Browse files Browse the repository at this point in the history
  • Loading branch information
rossarmstrong committed Nov 29, 2023
1 parent 78390f0 commit c4064b8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_werp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit c4064b8

Please sign in to comment.