From 9564d011d274e90d483c1162a3b1acf31290df29 Mon Sep 17 00:00:00 2001 From: Ross Armstrong <52817125+rossarmstrong@users.noreply.github.com> Date: Tue, 28 Nov 2023 22:43:27 +1100 Subject: [PATCH] Update unittest for the normalize module --- tests/test_normalize.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tests/test_normalize.py b/tests/test_normalize.py index 33dd686..8e135d1 100644 --- a/tests/test_normalize.py +++ b/tests/test_normalize.py @@ -83,10 +83,7 @@ def test_normalize_reference(self): 'taxes are a tool in the adjustment of the economy' ] - try: - self.assertEqual(normalize(reference), expected_normalized_reference) - except AssertionError as e: - self.fail(f"Assertion error in test_normalize_reference: {e}") + self.assertEqual(normalize(reference), expected_normalized_reference) def test_normalize_hypothesis(self): @@ -118,10 +115,7 @@ def test_normalize_hypothesis(self): 'taxes are a tool in the adjustment of the economy' ] - try: - self.assertEqual(normalize(hypothesis), expected_normalized_hypothesis) - except AssertionError as e: - self.fail(f"Assertion error in test_normalize_hypothesis: {e}") + self.assertEqual(normalize(hypothesis), expected_normalized_hypothesis) def test_normalize_string(self): @@ -132,10 +126,8 @@ def test_normalize_string(self): expected_normalized_reference = 'its consumed domestically and exported to other countries' - try: - self.assertEqual(normalize(reference), expected_normalized_reference) - except AssertionError as e: - self.fail(f"Assertion error in test_normalize_string: {e}") + self.assertEqual(normalize(reference), expected_normalized_reference) + if __name__ == '__main__': # pragma: no cover unittest.main()