diff --git a/src/main/py/fractions.py b/src/main/py/fractions.py new file mode 100644 index 0000000..24a04cf --- /dev/null +++ b/src/main/py/fractions.py @@ -0,0 +1,2 @@ +def frac_to_dec(num, denom): + return num/denom \ No newline at end of file diff --git a/src/test/py/test_fractions.py b/src/test/py/test_fractions.py new file mode 100644 index 0000000..9c856c1 --- /dev/null +++ b/src/test/py/test_fractions.py @@ -0,0 +1,17 @@ +import unittest +from src.main.py.fractions import * + + +class fractions(unittest.TestCase): + def setUp(self): + pass + + def tearDown(self): + pass + + def test_dec_value_of_20_by_5_should_be_4(self): + self.assertEqual(frac_to_dec(20,5), 4) # add assertion here + + +if __name__ == '__main__': + unittest.main()