Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of https://github.com/ponty/PyMouse

  • Loading branch information...
commit 8ae7bd27d7fb1305d5d7149594d4abbf4d1ce947 2 parents f4838cb + b963e26
@pepijndevos pepijndevos authored
Showing with 21 additions and 3 deletions.
  1. +21 −3 tests/test_unix.py
View
24 tests/test_unix.py
@@ -82,7 +82,6 @@ def test_move(self):
finally:
disp.stop()
- #this fails with current version
def test_event(self):
for size in screen_sizes:
try:
@@ -90,12 +89,31 @@ def test_event(self):
mouse = PyMouse()
event = Event()
event.start()
+ # first move is ignored, why?
+ mouse.move(0, 0)
for p in positions:
event.pos = None
mouse.move(*p)
+ time.sleep(0.1)
+ print 'check ', expect_pos(p, size), '=', event.pos
eq_(expect_pos(p, size), event.pos)
event.stop()
finally:
disp.stop()
-
-
+ #this fails with current version
+ def test_1st_event(self):
+ size = (100, 100)
+ try:
+ disp = Display(visible=VISIBLE, size=size).start()
+ mouse = PyMouse()
+ event = Event()
+ event.start()
+ event.pos = None
+ mouse.move(10, 10)
+ time.sleep(0.1)
+ eq_((10, 10), event.pos)
+ event.stop()
+ finally:
+ disp.stop()
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.