diff --git a/py/BUILD.bazel b/py/BUILD.bazel index 7d54997f878c6..5bde6e45a48ec 100644 --- a/py/BUILD.bazel +++ b/py/BUILD.bazel @@ -405,7 +405,6 @@ BIDI_TESTS = glob(["test/selenium/webdriver/common/**/*bidi*_tests.py"]) ), args = [ "--instafail", - "--bidi=false", ] + BROWSERS[browser]["args"], data = BROWSERS[browser]["data"], env_inherit = ["DISPLAY"], @@ -432,7 +431,7 @@ BIDI_TESTS = glob(["test/selenium/webdriver/common/**/*bidi*_tests.py"]) ), args = [ "--instafail", - "--bidi=true", + "--bidi", ] + BROWSERS[browser]["args"], data = BROWSERS[browser]["data"], env_inherit = ["DISPLAY"], @@ -480,7 +479,7 @@ py_test_suite( ), args = [ "--instafail", - "--headless=true", + "--headless", ] + BROWSERS["chrome"]["args"], data = BROWSERS["chrome"]["data"], env_inherit = ["DISPLAY"], diff --git a/py/conftest.py b/py/conftest.py index 1cf4d3a98691b..47088ed71d77b 100644 --- a/py/conftest.py +++ b/py/conftest.py @@ -47,44 +47,43 @@ def pytest_addoption(parser): choices=drivers, dest="drivers", metavar="DRIVER", - help="driver to run tests against ({})".format(", ".join(drivers)), + help="Driver to run tests against ({})".format(", ".join(drivers)), ) parser.addoption( "--browser-binary", action="store", dest="binary", - help="location of the browser binary", + help="Location of the browser binary", ) parser.addoption( "--driver-binary", action="store", dest="executable", - help="location of the service executable binary", + help="Location of the service executable binary", ) parser.addoption( "--browser-args", action="store", dest="args", - help="arguments to start the browser with", + help="Arguments to start the browser with", ) parser.addoption( "--headless", - action="store", + action="store_true", dest="headless", - help="Allow tests to run in headless", + help="Run tests in headless mode", ) parser.addoption( "--use-lan-ip", action="store_true", dest="use_lan_ip", - help="Whether to start test server with lan ip instead of localhost", + help="Start test server with lan ip instead of localhost", ) parser.addoption( "--bidi", - action="store", + action="store_true", dest="bidi", - metavar="BIDI", - help="Whether to enable BiDi support", + help="Enable BiDi support", ) @@ -179,7 +178,7 @@ def fin(): # and doesn't seems to be stable enough, causing the flakiness of the # subsequent tests. # Remove this when BiDi implementation and API is stable. - if bool(request.config.option.bidi): + if request.config.option.bidi: def fin(): global driver_instance @@ -196,8 +195,8 @@ def fin(): def get_options(driver_class, config): browser_path = config.option.binary browser_args = config.option.args - headless = bool(config.option.headless) - bidi = bool(config.option.bidi) + headless = config.option.headless + bidi = config.option.bidi options = None if browser_path or browser_args: