Skip to content

Commit 27c9166

Browse files
committed
[py] Check proper return code
1 parent bb38fd0 commit 27c9166

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
@@ -117,7 +117,7 @@ def test_driver_is_stopped_if_browser_cant_start(clean_driver, driver_executable
117117
with pytest.raises(SessionNotCreatedException):
118118
driver = clean_driver(options=options, service=service)
119119
assert not service.is_connectable()
120-
assert service.process.poll() < 0
120+
assert service.process.poll() is not None
121121
try:
122122
driver.quit()
123123
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
@@ -117,7 +117,7 @@ def test_driver_is_stopped_if_browser_cant_start(clean_driver, driver_executable
117117
with pytest.raises(SessionNotCreatedException):
118118
driver = clean_driver(options=options, service=service)
119119
assert not service.is_connectable()
120-
assert service.process.poll() < 0
120+
assert service.process.poll() is not None
121121
try:
122122
driver.quit()
123123
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)