final

parent 1ace3537
...@@ -28,3 +28,8 @@ ...@@ -28,3 +28,8 @@
2020-12-06 22:05:40.598847 : / : (36, 6.0, 3) = 2.0 2020-12-06 22:05:40.598847 : / : (36, 6.0, 3) = 2.0
2020-12-06 22:05:40.605827 : * : (7, 2.3, 4.9) = 78.89 2020-12-06 22:05:40.605827 : * : (7, 2.3, 4.9) = 78.89
2020-12-06 22:05:40.606926 : + : (1.7, 4.4, 3.0, 8) = 17.1 2020-12-06 22:05:40.606926 : + : (1.7, 4.4, 3.0, 8) = 17.1
2020-12-10 11:49:46.945228 : - : (2, 10.34) = -8.34
2020-12-10 11:49:46.966985 : - : (8, 2.3, 0, 4.55) = 1.15
2020-12-10 11:49:47.014899 : / : (25, 5.0, 2.5) = 2.0
2020-12-10 11:49:47.016894 : * : (3.2, 5.6, 1) = 17.92
2020-12-10 11:49:47.017892 : + : (3.2, 5.4, 1.0, 6) = 15.6
...@@ -130,6 +130,9 @@ class TestCalculator(unittest.TestCase): ...@@ -130,6 +130,9 @@ class TestCalculator(unittest.TestCase):
def test_div(self): def test_div(self):
self.assertEqual((calculate(*(25, 5.0, 2.5), action="/", **PARAMS)), 2.0) self.assertEqual((calculate(*(25, 5.0, 2.5), action="/", **PARAMS)), 2.0)
def test_precision(self):
self.assertEqual(convert_precision(0.0000001), 7)
def test_error(self): def test_error(self):
with self.assertRaises(Exception): with self.assertRaises(Exception):
calculate(*(5,0), action="/", **PARAMS) calculate(*(5,0), action="/", **PARAMS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment