From 52164e6be2e1c18e8404ba1d3a57247947f7f101 Mon Sep 17 00:00:00 2001 From: fdai7783 Date: Thu, 18 Jan 2024 23:11:26 +0100 Subject: [PATCH] refactoring: renamed sqrt function to better fit .math function name --- src/main/py/logarithmic_and_expo_and_root_calculations.py | 2 +- src/test/py/logarithmic_ann_expo_and_root_calculations.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/py/logarithmic_and_expo_and_root_calculations.py b/src/main/py/logarithmic_and_expo_and_root_calculations.py index 8ce709c..087e88f 100644 --- a/src/main/py/logarithmic_and_expo_and_root_calculations.py +++ b/src/main/py/logarithmic_and_expo_and_root_calculations.py @@ -1,5 +1,5 @@ import math -def sqr(first_number): +def sqrt(first_number): return math.sqrt(first_number) diff --git a/src/test/py/logarithmic_ann_expo_and_root_calculations.py b/src/test/py/logarithmic_ann_expo_and_root_calculations.py index 2cedfa0..3ebeaf7 100644 --- a/src/test/py/logarithmic_ann_expo_and_root_calculations.py +++ b/src/test/py/logarithmic_ann_expo_and_root_calculations.py @@ -9,8 +9,8 @@ class primitive_calculations(unittest.TestCase): def tearDown(self): pass - def test_sqr_of_4_equals_2(self): - self.assertEqual(sqr(4), 2) + def test_sqrt_of_4_equals_2(self): + self.assertEqual(sqrt(4), 2) if __name__ == "__main__":