Skip to content

Commit 062a20a

Browse files
committed
[py] Check proper return code
1 parent af852cc commit 062a20a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

py/test/selenium/webdriver/chrome/chrome_service_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def test_driver_is_stopped_if_browser_cant_start(clean_driver, driver_executable
119119
with pytest.raises(SessionNotCreatedException):
120120
driver = clean_driver(options=options, service=service)
121121
assert not service.is_connectable()
122-
assert service.process.poll() < 0
122+
assert service.process.poll() is not None
123123
try:
124124
driver.quit()
125125
except Exception:

py/test/selenium/webdriver/edge/edge_service_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def test_driver_is_stopped_if_browser_cant_start(clean_driver, driver_executable
119119
with pytest.raises(SessionNotCreatedException):
120120
driver = clean_driver(options=options, service=service)
121121
assert not service.is_connectable()
122-
assert service.process.poll() < 0
122+
assert service.process.poll() is not None
123123
try:
124124
driver.quit()
125125
except Exception:

py/test/selenium/webdriver/firefox/firefox_service_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_driver_is_stopped_if_browser_cant_start(clean_driver, driver_executable
7474
with pytest.raises(SessionNotCreatedException):
7575
driver = clean_driver(options=options, service=service)
7676
assert not service.is_connectable()
77-
assert service.process.poll() < 0
77+
assert service.process.poll() is not None
7878
try:
7979
driver.quit()
8080
except Exception:

0 commit comments

Comments
 (0)