|
@ -27,6 +27,9 @@ class fractions(unittest.TestCase): |
|
|
def test_add_fractions_1_by_10_and_2_by_5_should_be_1_by_2(self): |
|
|
def test_add_fractions_1_by_10_and_2_by_5_should_be_1_by_2(self): |
|
|
self.assertEqual(addFractions(1, 10, 2, 5), (1, 2)) |
|
|
self.assertEqual(addFractions(1, 10, 2, 5), (1, 2)) |
|
|
|
|
|
|
|
|
|
|
|
def test_multiply_fractions_1_by_2_and_1_by_2_should_be_1_by_4(self): |
|
|
|
|
|
self.assertEqual(multiplyFractions(1,2,1,2), (1,4)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
if __name__ == '__main__': |
|
|
unittest.main() |
|
|
unittest.main() |