Skip to content

Commit

Permalink
Fix compatibility with Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Jul 19, 2024
1 parent eb49d9c commit a9a5e79
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions echo/tests/test_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ def test_callbacks(self):
self.state.add_callback('a', func)

self.a.set_choices(self.state, [1, 2, 3])
assert func.called_once_with(1)
func.assert_called_with(1)

self.state.a = 2
assert func.called_once_with(2)
func.assert_called_with(2)

self.a.set_choices(self.state, [4, 5, 6])
assert func.called_once_with(4)
func.assert_called_with(4)

def test_choice_separator(self):

Expand All @@ -128,13 +128,13 @@ def test_delay(self):
with delay_callback(self.state, 'a'):
self.a.set_choices(self.state, [4, 5, 6])
assert func.call_count == 0
assert func.called_once_with(4)
func.assert_called_once_with(4)
func.reset_mock()

# Check that the callback gets called even if only the choices
# but not the selection are changed in a delay block
with delay_callback(self.state, 'a'):
self.a.set_choices(self.state, [1, 2, 4])
assert func.call_count == 0
assert func.called_once_with(4)
func.assert_called_once_with(4)
func.reset_mock()

0 comments on commit a9a5e79

Please sign in to comment.