From efd974451a98ce59d6ad94f2e8d17fe54d5e01aa Mon Sep 17 00:00:00 2001 From: k-dovgan Date: Mon, 15 May 2023 17:00:20 +0300 Subject: [PATCH] fix(test): hotfix GeckoDriver bug with wrong Firefox path See details here: https://github.com/mozilla/geckodriver/issues/2062 --- tests/test_html_output.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_html_output.py b/tests/test_html_output.py index 26031463..63d5c405 100644 --- a/tests/test_html_output.py +++ b/tests/test_html_output.py @@ -61,6 +61,10 @@ def environment_main_and_nonci(request, tmp_path): def browser(): options = Options() options.headless = True + # Deleting SNAP variables is hotfix for geckodriver bug: https://github.com/mozilla/geckodriver/issues/2062 + for key in os.environ: + if "SNAP" in key: + del os.environ[key] firefox = webdriver.Firefox(options=options) yield firefox firefox.close()