Skip to content

Commit

Permalink
Merge branch 'enriquein-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
gcollazo committed May 25, 2014
2 parents dc82a9c + a96c6ca commit c703403
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion win/pywinauto/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ def process_from_module(module):

modules = []
# Get the process names
for i in range(0, bytes_returned.value / ctypes.sizeof(ctypes.c_int)):
for i in range(0, bytes_returned.value // ctypes.sizeof(ctypes.c_int)):
try:
modules.append((processes[i], process_module(processes[i])))
except ProcessNotFoundError:
Expand Down
4 changes: 2 additions & 2 deletions win/pywinauto/controls/Accessability HwndWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1634,9 +1634,9 @@ def _perform_click_input(

# set the default coordinates
if coords[0] is None:
coords[0] = ctrl.Rectangle().width() / 2
coords[0] = ctrl.Rectangle().width() // 2
if coords[1] is None:
coords[1] = ctrl.Rectangle().height() / 2
coords[1] = ctrl.Rectangle().height() // 2

if not absolute:
coords[0] = coords[0] + ctrl.Rectangle().left
Expand Down
4 changes: 2 additions & 2 deletions win/pywinauto/controls/HwndWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1533,9 +1533,9 @@ def _perform_click_input(

# set the default coordinates
if coords[0] is None:
coords[0] = ctrl.Rectangle().width() / 2
coords[0] = ctrl.Rectangle().width() // 2
if coords[1] is None:
coords[1] = ctrl.Rectangle().height() / 2
coords[1] = ctrl.Rectangle().height() // 2

if not absolute:
coords[0] = coords[0] + ctrl.Rectangle().left
Expand Down
2 changes: 1 addition & 1 deletion win/pywinauto/controls/common_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def _as_item_index(self, item):
"""
index = item
if isinstance(item, str):
index = (self.Texts().index(item) - 1) / self.ColumnCount()
index = (self.Texts().index(item) - 1) // self.ColumnCount()

return index

Expand Down
2 changes: 1 addition & 1 deletion win/pywinauto/timings.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def Fast(self):
min(1, TimeConfig._timings[setting])

if "_wait" in setting:
TimeConfig._timings[setting] = TimeConfig._timings[setting] / 2
TimeConfig._timings[setting] = TimeConfig._timings[setting] // 2

elif setting.endswith("_retry"):
TimeConfig._timings[setting] = 0.001
Expand Down
6 changes: 3 additions & 3 deletions win/pywinauto/unittests/test_SendKeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
>>> print val
a
>>>
>>> SendKeys(u"ä\\r\\n")
>>> SendKeys(u"ä\\r\\n")
>>> val = raw_input()
>>> print val
ä
ä
>>>
"""
Expand Down Expand Up @@ -157,7 +157,7 @@ def testANSIExtendedCharacters(self):
"Make sure that sending any character in range "
os.system("chcp 850")
matched = 0
extended_chars = "äëïöüáéíóúâêîôûàèìòùãõñýç"
extended_chars = "äëïöüáéíóúâêîôûàèìòùãõñýç"
for char in extended_chars:

SendKeys(char + "{ENTER}", pause = .01)
Expand Down
4 changes: 2 additions & 2 deletions win/pywinauto/win32structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ def height(self):
def mid_point(self):
"Return a POINT structure representing the mid point"
pt = POINT()
pt.x = int(self.left + self.width()/2)
pt.y = int(self.top + self.height()/2)
pt.x = int(self.left + self.width()//2)
pt.y = int(self.top + self.height()//2)
return pt

#def __hash__(self):
Expand Down

0 comments on commit c703403

Please sign in to comment.