Skip to content

Commit

Permalink
Update unittest for the normalize module
Browse files Browse the repository at this point in the history
  • Loading branch information
rossarmstrong committed Nov 28, 2023
1 parent cf9cf6c commit 9564d01
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/test_normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand All @@ -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()

0 comments on commit 9564d01

Please sign in to comment.