Skip to content

Commit

Permalink
fix: change appearance of power button
Browse files Browse the repository at this point in the history
  • Loading branch information
gciatto committed May 2, 2024
1 parent 8ee2171 commit d8092dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions calculator/ui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
['4', '5', '6', '*'],
['1', '2', '3', '-'],
['.', '0', '=', '+'],
['(', '√', '**', ')'],
['(', '√', '^', ')'],
['log'],
]

Expand Down Expand Up @@ -76,7 +76,7 @@ def on_button_press(self, button):
case "√":
self._calc.square_root()
self._calc.open_parenthesis()
case "**":
case "^":
self._calc.power()
case "log":
self._calc.logarithm()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_expression_wit_sqrt(self):

def test_expression_with_pow(self):
self.press_button("2")
self.press_button("**")
self.press_button("^")
self.press_button("3")
self.assert_display("2**3")
self.press_button("=")
Expand Down

0 comments on commit d8092dc

Please sign in to comment.