Skip to content

Commit

Permalink
Cleanup touch event from scatter instance in MultitouchSimulatorTestC…
Browse files Browse the repository at this point in the history
…ase.
  • Loading branch information
pythonic64 committed Apr 24, 2021
1 parent 87906f1 commit 4a7e10b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kivy/tests/test_mouse_multitouchsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def multitouch_dot_touch(self, button, **kwargs):
# called == multitouch_sim is False
self.advance_frames(1) # initialize stuff
wid.on_touch_down(mouse.touches[event_id])
mouse.touches[event_id].grab_state = True
wid.on_touch_up(mouse.touches[event_id])
mouse.touches[event_id].grab_state = True
self.assertTrue(mouse.touches[event_id].multitouch_sim)

elif 'disabled' in kwargs:
Expand Down Expand Up @@ -277,7 +279,9 @@ def multitouch_dot_move(self, button, **kwargs):
# called == multitouch_sim is False
self.advance_frames(1) # initialize stuff
wid.on_touch_down(mouse.touches[event_id])
mouse.touches[event_id].grab_state = True
wid.on_touch_up(mouse.touches[event_id])
mouse.touches[event_id].grab_state = False
self.assertTrue(mouse.touches[event_id].multitouch_sim)
win.dispatch(
'on_mouse_up',
Expand Down Expand Up @@ -522,7 +526,7 @@ def test_multitouch_appear(self):

self.render(wid)

self.remove_sim_touch(win, 10, 10)
self.remove_sim_touch(win, 11, 11)
self.assertFalse(mouse.touches)

# cleanup!
Expand Down

0 comments on commit 4a7e10b

Please sign in to comment.