Skip to content

Commit a4a531c

Browse files
committed
Fix flaky tests
1 parent 9e1524d commit a4a531c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- uses: actions/checkout@v6
9898
- name: Install Selenium
9999
run: |
100-
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
100+
curl -LsSfO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
101101
sudo dpkg -i google-chrome-stable_current_amd64.deb || sudo apt-get -f install -y
102102
- uses: actions/setup-python@v6
103103
with:

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def random_name(n):
2828
@pytest.fixture(scope="session")
2929
def driver():
3030
chrome_options = webdriver.ChromeOptions()
31-
chrome_options.headless = True
31+
chrome_options.add_argument("--headless=new")
3232
try:
3333
b = webdriver.Chrome(options=chrome_options)
3434
except WebDriverException as e:

tests/test_forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def test_lang_attr(self):
5353

5454
# Regression test for #163
5555
widget = Select2Widget()
56-
assert widget.i18n_name == translation.get_language()
56+
with translation.override("en"):
57+
assert widget.i18n_name == "en"
5758
with translation.override("de"):
5859
assert widget.i18n_name == "de"
5960

0 commit comments

Comments
 (0)