Skip to content

Commit a682461

Browse files
committed
disable sandbox and dev-shm-usage when testing
1 parent 1c9c57c commit a682461

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

tests/test_ensure_elements_deprecation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ def create_chrome_session(headless=False):
1313
if headless:
1414
chrome_options.add_argument("--headless=new")
1515
chrome_options.add_argument(f"--user-data-dir={tempfile.mkdtemp()}")
16+
chrome_options.add_argument("--no-sandbox")
17+
chrome_options.add_argument("--disable-dev-shm-usage")
1618
return Session(webdriver_path=chrome_webdriver_path, browser_options=chrome_options)
1719

1820

tests/test_requestium.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def create_chrome_session(headless=False):
1515
if headless:
1616
chrome_options.add_argument("--headless=new")
1717
chrome_options.add_argument(f"--user-data-dir={tempfile.mkdtemp()}")
18+
chrome_options.add_argument("--no-sandbox")
19+
chrome_options.add_argument("--disable-dev-shm-usage")
1820
return Session(webdriver_path=chrome_webdriver_path, browser_options=chrome_options)
1921

2022

0 commit comments

Comments
 (0)