Skip to content

Commit 0097f7e

Browse files
authored
Fix CI fails (appium#436)
* Skip taking the screenshot not in CI * Skip py38 on travis
1 parent 097719f commit 0097f7e

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ python:
77
- "3.5"
88
- "3.6"
99
- "3.7"
10-
- "3.8-dev"
10+
# - "3.8-dev" # TODO Remove comment-out when pylint and astroid upgraded to the latest and py2 support dropped
1111

1212
install:
1313
- pip install tox-travis

test/functional/android/helper/test_helper.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def setUp(self):
6464
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
6565

6666
def tearDown(self):
67-
img_path = os.path.join(os.getcwd(), self._testMethodName + '.png')
68-
self.driver.get_screenshot_as_file(img_path)
67+
if is_ci():
68+
# Take the screenshot to investigate when tests failed only on CI
69+
img_path = os.path.join(os.getcwd(), self._testMethodName + '.png')
70+
self.driver.get_screenshot_as_file(img_path)
6971
self.driver.quit()

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ envlist =
66
py35,
77
py36,
88
py37,
9-
py38
9+
# py38 # TODO Remove comment-out when pylint and astroid upgraded to the latest and py2 support dropped
1010

1111
[testenv]
1212
deps =

0 commit comments

Comments
 (0)