Skip to content

Commit c3e5ca7

Browse files
committed
[py] Skip tests on Windows that fail
1 parent 88cf6fd commit c3e5ca7

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import os
1919
import subprocess
20+
import sys
2021
import time
2122
from unittest.mock import patch
2223

@@ -107,6 +108,10 @@ def test_log_output_null_default(driver, capfd) -> None:
107108
driver.quit()
108109

109110

111+
@pytest.mark.skipif(
112+
sys.platform == "win32",
113+
reason="chromedriver doesn't return an error on windows if you use an invalid profile path",
114+
)
110115
@pytest.mark.no_driver_after_test
111116
def test_driver_is_stopped_if_browser_cant_start(clean_driver, clean_options, driver_executable) -> None:
112117
clean_options.add_argument("--user-data-dir=/no/such/location")

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ def test_log_output_null_default(driver, capfd) -> None:
107107
driver.quit()
108108

109109

110+
@pytest.mark.skipif(
111+
sys.platform == "win32",
112+
reason="edgedriver doesn't return an error on windows if you use an invalid profile path",
113+
)
110114
@pytest.mark.no_driver_after_test
111115
def test_driver_is_stopped_if_browser_cant_start(clean_driver, clean_options, clean_service, driver_executable) -> None:
112116
clean_options.add_argument("--user-data-dir=/no/such/location")

py/test/unit/selenium/webdriver/virtual_authenticator/virtual_authenticator_options_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
import sys
19+
1820
import pytest
1921

2022
from selenium.webdriver.common.virtual_authenticator import VirtualAuthenticatorOptions
@@ -43,6 +45,7 @@ def test_bespoke_options_for_virtual_authenticator():
4345
}
4446

4547

48+
@pytest.mark.skipif(sys.platform == "win32", reason="Fails when run with Bazel on GH runners")
4649
def test_to_dict_with_defaults(options):
4750
default_options = options.to_dict()
4851
assert default_options["transport"] == VirtualAuthenticatorOptions.Transport.USB.value

0 commit comments

Comments
 (0)