Skip to content

Commit

Permalink
✅ Added test_exponentiate test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgardzinski committed Apr 4, 2024
1 parent f742d8e commit 3f40e1c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion calculator/tests/unit_tests_calculator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# test_calculator.py

from calculator import add, multiply, divide, subtract, square_root
from calculator import add, multiply, divide, subtract, square_root, exponentiate


def test_addition():
Expand Down Expand Up @@ -31,3 +31,9 @@ def test_square_root():
assert square_root(4) == 2
assert square_root(25) == 5
assert square_root(9) == 3


def test_exponentiate():
assert exponentiate(2, 2) == 4
assert exponentiate(-3, 3) == -27
assert exponentiate(9, 0) == 1

0 comments on commit 3f40e1c

Please sign in to comment.