Skip to content

Commit

Permalink
Merge pull request pywinauto#934 from airelil/atspi_dev
Browse files Browse the repository at this point in the history
TravisCI: update to xenial, add python 3.7 and 3.8, remove 3.3 and 3.5
  • Loading branch information
vasily-v-ryabov authored May 18, 2020
2 parents ac1af1e + 6d48f3a commit 5fc0a7f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
21 changes: 9 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
sudo: required
dist: trusty
dist: xenial
language: cpp
notifications:
email: false

services:
xvfb

language: python

python:
#- "2.6"
- "2.7_with_system_site_packages"
- "3.3"
- "3.4_with_system_site_packages"
- "3.5"
- "2.7"
- "3.4"
- "3.6"
- "3.7"
- "3.8"
os:
- linux
before_install:
- sudo add-apt-repository -y ppa:beineri/opt-qt58-trusty
- sudo add-apt-repository -y ppa:beineri/opt-qt58-xenial

install:
- pip install python-xlib codecov coverage
Expand All @@ -29,12 +28,10 @@ install:
- sudo apt-get install xsel
- sudo apt-get install libgtk-3-dev libgtk2.0-dev
- sudo apt-get install -y python3-gi
- sudo apt-get install --reinstall libgl1-mesa-dev
- source /opt/qt58/bin/qt58-env.sh;

before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
- xauth generate :99.0 . trusted
# Clone test apps
- git init apps
Expand Down
10 changes: 5 additions & 5 deletions apps/Gtk_samples/gtk_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,23 @@ def __init__(self):
grid = Gtk.Grid()
self.add(grid)

self.button1 = Gtk.Button("Click")
self.button1 = Gtk.Button(label="Click")
self.button1.connect("clicked", self.on_click_me_clicked)

self.button2 = Gtk.Button(stock=Gtk.STOCK_OPEN)
self.button2.connect("clicked", self.on_open_clicked)

self.button3 = Gtk.Button("C_l_o_s_e", use_underline=True)
self.button3 = Gtk.Button(label="C_l_o_s_e", use_underline=True)
self.button3.connect("clicked", self.on_close_clicked)

self.button4 = Gtk.CheckButton("Button 1")
self.button4 = Gtk.CheckButton(label="Button 1")
self.button4.connect("toggled", self.on_button_toggled, "1")

self.button5 = Gtk.CheckButton("Editable", use_underline=True)
self.button5 = Gtk.CheckButton(label="Editable", use_underline=True)
self.button5.set_active(True)
self.button5.connect("toggled", self.on_text_editable_button_toggled, "2")

self.label = Gtk.Label("Status")
self.label = Gtk.Label(label="Status")
self.combo = self._add_combobox()
self.treeview = self._add_listview()
self.image = _add_image_widget()
Expand Down
2 changes: 1 addition & 1 deletion pywinauto/unittests/test_application_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_connect_by_path(self):
def test_cpu_usage(self):
self.app.start(_test_app())
self.assertGreater(self.app.cpu_usage(0.1), 0)
self.app.wait_cpu_usage_lower(threshold=0.1, timeout=2.9, usage_interval=0.2)
self.app.wait_cpu_usage_lower(threshold=0.1, timeout=4.0, usage_interval=0.3)
# default timings
self.assertEqual(self.app.cpu_usage(), 0)

Expand Down
8 changes: 4 additions & 4 deletions pywinauto/unittests/test_atspi_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ def test_image(self):
self.assertEqual(img_wrp.locale(), u'')
self.assertEqual(img_wrp.size(), (48, 24))
pos = img_wrp.position()
self.assertEqual(pos.x, 422)
self.assertAlmostEqual(pos.y, 31, delta=2)
self.assertAlmostEqual(pos.x, 408, delta=2)
self.assertAlmostEqual(pos.y, 29, delta=2)
bb = img_wrp.bounding_box()
self.assertEqual(bb.left, pos.x)
self.assertEqual(bb.top, pos.y)
self.assertEqual(bb.right, 470)
self.assertAlmostEqual(bb.bottom, 55, delta=2)
self.assertAlmostEqual(bb.right, 456, delta=2)
self.assertAlmostEqual(bb.bottom, 53, delta=2)

def test_can_get_rectangle(self):
rect = self.app_frame.Panel.rectangle()
Expand Down

0 comments on commit 5fc0a7f

Please sign in to comment.