Skip to content

Commit

Permalink
added first test
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrPanov committed Jun 2, 2020
1 parent 53e9f82 commit 87d0e54
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pywinauto/unittests/test_mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import unittest
if sys.platform == 'win32':
import win32api
import win32clipboard
sys.path.append(".")
from pywinauto.application import Application
Expand Down Expand Up @@ -127,7 +128,13 @@ def test_wheel_click(self):
self.assertTrue("Mouse Press" in data)
self.assertTrue("Mouse Release" in data)
self.assertTrue("MiddleButton" in data)


if sys.platform == "win32":
def test_mouse_move(self):
coord = (0, 1)
mouse.move(coord)
self.assertEqual(coord, win32api.GetCursorPos())

if sys.platform != 'win32':
def test_swapped_buttons(self):
current_map = self.display.get_pointer_mapping()
Expand Down

0 comments on commit 87d0e54

Please sign in to comment.