Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit 352135f

Browse files
committed
Update pep8; Update test configuration
1 parent c50b787 commit 352135f

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sudo: false
77
env:
88
- DISPLAY=:0.0
99
install:
10-
- pip install tox-travis
10+
- pip install -U tox-travis
1111
script:
1212
- export APPLITOOLS_BATCH_ID=`uuidgen -t`
1313
- echo $APPLITOOLS_BATCH_ID

eyes_selenium/applitools/eyes_selenium/capture/dom_capture.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def get_full_window_dom(driver, position_provider=None):
134134

135135
def _get_window_dom(driver):
136136
args_obj = {
137-
'styleProps': [
137+
'styleProps': [
138138
"background-color",
139139
"background-image",
140140
"background-size",
@@ -145,13 +145,13 @@ def _get_window_dom(driver):
145145
"padding",
146146
"margin"
147147
],
148-
'attributeProps': {
149-
'all': ['id', 'class'],
150-
'IMG': ['core'],
148+
'attributeProps': {
149+
'all': ['id', 'class'],
150+
'IMG': ['core'],
151151
'IFRAME': ['core'],
152-
'A': ['href']
152+
'A': ['href']
153153
},
154-
'rectProps': [
154+
'rectProps': [
155155
"width",
156156
"height",
157157
"top",
@@ -274,8 +274,8 @@ def _serialize_css(base_url, stylesheet):
274274
def _download_css(base_url, value):
275275
# type: (tp.Text, tp.Text) -> tp.Text
276276
logger.info("Given URL to download: {}".format(value))
277-
if (general_utils.is_absolute_url(value) and
278-
not general_utils.is_url_with_scheme(value)):
277+
if (general_utils.is_absolute_url(value)
278+
and not general_utils.is_url_with_scheme(value)):
279279
url = urljoin('http://', value)
280280
else:
281281
url = urljoin(base_url, value)

eyes_selenium/applitools/eyes_selenium/eyes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def _obtain_screenshot_type(self, is_element, inside_a_frame, stitch_content, fo
103103
return ScreenshotType.REGION_OR_ELEMENT_SCREENSHOT
104104

105105
if not inside_a_frame:
106-
if ((force_fullpage and not stitch_content) or
107-
(stitch_content and not is_element)):
106+
if ((force_fullpage and not stitch_content)
107+
or (stitch_content and not is_element)):
108108
return ScreenshotType.FULLPAGE_SCREENSHOT
109109

110110
if inside_a_frame or stitch_content:

eyes_selenium/applitools/eyes_selenium/webdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def user_agent(self):
276276
user_agent = self.driver.execute_script("return navigator.userAgent")
277277
logger.info("user agent: {}".format(user_agent))
278278
except Exception as e:
279-
logger.info("Failed to obtain user-agent string")
279+
logger.info("Failed to obtain user-agent string\n\t {}".format(str(e)))
280280
user_agent = None
281281
return user_agent
282282

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ description = run the unit tests with pytest under {basepython}
1616
passenv = SAUCE_USERNAME SAUCE_ACCESS_KEY APPLITOOLS_API_KEY SELENIUM_SERVER_URL TOXENV CI DISPLAY TRAVIS TRAVIS_* APPLITOOLS_BATCH_ID
1717
deps =
1818
invoke
19+
pathlib
1920
pytest==3.8.2
2021

2122
;[testenv:core]
@@ -25,6 +26,7 @@ deps =
2526

2627
[testenv:images]
2728
commands =
29+
pip install -U setuptools
2830
inv install-packages -core
2931
inv install-packages -images
3032
inv test-run -images
@@ -40,5 +42,6 @@ commands =
4042
basepython = python3.6
4143
extras = dev
4244
commands =
45+
inv install-requirements
4346
inv pep-check
4447
inv mypy-check

0 commit comments

Comments
 (0)