From 45f04a018ab16bbcb42f92b655bc9a33601877c7 Mon Sep 17 00:00:00 2001 From: fdai7764 Date: Sat, 27 Jan 2024 15:32:22 +0100 Subject: [PATCH] added test to use sqrt_power with float as exponent --- src/test/py/test_calculations_with_roots.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/py/test_calculations_with_roots.py b/src/test/py/test_calculations_with_roots.py index 1928c80..2bc6bdc 100644 --- a/src/test/py/test_calculations_with_roots.py +++ b/src/test/py/test_calculations_with_roots.py @@ -24,6 +24,9 @@ class calculationsWithRoots(unittest.TestCase): def test_sqrt_negative_4_to_power_of_3_should_be_negative_one_for_error(self): self.assertEqual(sqrt_power(-4, 3), -1) + def test_sqrt_16_to_power_of_point5_should_be_2(self): + self.assertEqual(sqrt_power(16, 0.5), 2) + if __name__ == '__main__': unittest.main()