Skip to content

Commit

Permalink
Update unittest for the summaryp module
Browse files Browse the repository at this point in the history
  • Loading branch information
rossarmstrong committed Nov 29, 2023
1 parent ac84e1f commit 9ee337e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_summaryp.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,21 @@ def test_summaryp_example_2(self):
except AssertionError as e: # pragma: no cover
print("DataFrames are not equal. Differences:\n", e)

def test_summaryp_example_3(self):
"""
Test the summaryp function with numerical reference and hypothesis inputs.
This test evaluates the SUMMARYP 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 wer module
expected_result = None

self.assertEqual(summaryp(ref, hyp, 0.5, 0.5, 1), expected_result)


if __name__ == "__main__": # pragma: no cover
unittest.main()

0 comments on commit 9ee337e

Please sign in to comment.