|
@ -15,6 +15,9 @@ class fractions(unittest.TestCase): |
|
|
def test_dec_value_of_negative_20_by_5_should_be_negative_4(self): |
|
|
def test_dec_value_of_negative_20_by_5_should_be_negative_4(self): |
|
|
self.assertEqual(frac_to_dec(-20,5), -4) |
|
|
self.assertEqual(frac_to_dec(-20,5), -4) |
|
|
|
|
|
|
|
|
|
|
|
def test_dec_value_to_fraction_point_two_five_should_be_1_by_4(self): |
|
|
|
|
|
self.assertEqual(dec_to_frac(0.25), (1,4)) |
|
|
|
|
|
|
|
|
def test_reduce_fraction_56_by_32_should_be_7_by_4(self): |
|
|
def test_reduce_fraction_56_by_32_should_be_7_by_4(self): |
|
|
self.assertEqual(reduceFraction(56,32), (7,4)) |
|
|
self.assertEqual(reduceFraction(56,32), (7,4)) |
|
|
|
|
|
|
|
|