From b641f0461140714be7b225aea913ac578c948653 Mon Sep 17 00:00:00 2001 From: fdai7764 Date: Fri, 19 Jan 2024 11:47:36 +0100 Subject: [PATCH] Added another test for negative numerators --- src/test/py/test_fractions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/py/test_fractions.py b/src/test/py/test_fractions.py index 9c856c1..4337fec 100644 --- a/src/test/py/test_fractions.py +++ b/src/test/py/test_fractions.py @@ -10,7 +10,10 @@ class fractions(unittest.TestCase): pass def test_dec_value_of_20_by_5_should_be_4(self): - self.assertEqual(frac_to_dec(20,5), 4) # add assertion here + self.assertEqual(frac_to_dec(20,5), 4) + + def test_dec_value_of_negative_20_by_5_should_be_negative_4(self): + self.assertEqual(frac_to_dec(-20,5), -4) if __name__ == '__main__':