|
@ -9,6 +9,12 @@ class MyTestCase(unittest.TestCase): |
|
|
def tearDown(self): |
|
|
def tearDown(self): |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
def test_pi_precision_1000000_should_be_3_point_141592(self): |
|
|
|
|
|
delta = pi_approx_leibniz(1000000) - 3.141592 |
|
|
|
|
|
if delta < 0: |
|
|
|
|
|
delta *= -1 |
|
|
|
|
|
self.assertLess(delta, 0.01) |
|
|
|
|
|
|
|
|
def test_rad_2_to_deg_should_be_114_point_59(self): |
|
|
def test_rad_2_to_deg_should_be_114_point_59(self): |
|
|
delta = rad2deg(2) - 114.59 |
|
|
delta = rad2deg(2) - 114.59 |
|
|
if delta < 0: |
|
|
if delta < 0: |
|
|