|
@ -0,0 +1,29 @@ |
|
|
|
|
|
import unittest |
|
|
|
|
|
from src.main.py.logarithmic_and_expo_and_root_calculations import * |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class primitive_calculations(unittest.TestCase): |
|
|
|
|
|
def setUp(self): |
|
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
def tearDown(self): |
|
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
def test_sqrt_of_4_equals_2(self): |
|
|
|
|
|
self.assertEqual(sqrt(4), 2) |
|
|
|
|
|
|
|
|
|
|
|
def test_2_potentiate_3_equals_8(self): |
|
|
|
|
|
self.assertEqual(potentiate(2, 3), 8) |
|
|
|
|
|
|
|
|
|
|
|
def test_4_log_2_equals_2(self): |
|
|
|
|
|
self.assertEqual(logarithmize(4, 2), 2) |
|
|
|
|
|
|
|
|
|
|
|
def test_4_ld_equals_2(self): |
|
|
|
|
|
self.assertEqual(logarithmize_dualis(4), 2) |
|
|
|
|
|
|
|
|
|
|
|
def test_10_log10_equals_1(self): |
|
|
|
|
|
self.assertEqual(logarithmize_base_10(10), 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
|
|
unittest.main() |