diff --git a/axe_selenium_python/axe.py b/axe_selenium_python/axe.py index 6e3bed8..8c74072 100755 --- a/axe_selenium_python/axe.py +++ b/axe_selenium_python/axe.py @@ -33,8 +33,10 @@ def execute(self, context=None, options=None): :param context: which page part(s) to analyze and/or what to exclude. :param options: dictionary of aXe options. """ - template = "var callback = arguments[arguments.length - 1];" \ - "axe.run(%s).then(results => callback(results))" + template = ( + "var callback = arguments[arguments.length - 1];" + + "axe.run(%s).then(results => callback(results))" + ) args = "" # If context parameter is passed, add to args diff --git a/axe_selenium_python/tests/test_axe.py b/axe_selenium_python/tests/test_axe.py index 0c99c3a..4217572 100755 --- a/axe_selenium_python/tests/test_axe.py +++ b/axe_selenium_python/tests/test_axe.py @@ -23,10 +23,13 @@ def firefox_driver(): def chrome_driver(): opts = webdriver.ChromeOptions() opts.headless = True - opts.add_argument('--no-sandbox') - driver_path = getenv('CHROMEDRIVER_PATH') - driver = webdriver.Chrome(options=opts, executable_path=driver_path) \ - if driver_path else webdriver.Chrome(options=opts) + opts.add_argument("--no-sandbox") + driver_path = getenv("CHROMEDRIVER_PATH") + driver = ( + webdriver.Chrome(options=opts, executable_path=driver_path) + if driver_path + else webdriver.Chrome(options=opts) + ) yield driver driver.close()