From 42222c7c230ca2b394b0d381041058f4a400f0da Mon Sep 17 00:00:00 2001 From: fdai7764 Date: Sat, 27 Jan 2024 15:34:23 +0100 Subject: [PATCH] added test to use sqrt_power with zero as exponent --- src/test/py/test_calculations_with_roots.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/py/test_calculations_with_roots.py b/src/test/py/test_calculations_with_roots.py index 2bc6bdc..7bb2c54 100644 --- a/src/test/py/test_calculations_with_roots.py +++ b/src/test/py/test_calculations_with_roots.py @@ -27,6 +27,8 @@ class calculationsWithRoots(unittest.TestCase): def test_sqrt_16_to_power_of_point5_should_be_2(self): self.assertEqual(sqrt_power(16, 0.5), 2) + def test_sqrt_16_to_power_of_0_should_be_1(self): + self.assertEqual(sqrt_power(16, 0), 1) if __name__ == '__main__': unittest.main()