Skip to content

Commit 52a904f

Browse files
committed
Add pytest-rerunfailures to reduce test flakiness (workaround!)
1 parent 7679b29 commit 52a904f

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[pytest]
22
log_format = %(asctime)s %(levelname)s %(filename)s:%(lineno)03d::%(funcName)-20s %(message)s
33
log_date_format = %H:%M:%S
4+
addopts = --reruns 3 --reruns-delay 2

tests/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dependencies:
77
- geckodriver=0.29.0
88
- pycurl=7.43.0.6
99
- pytest=6.2.4
10+
- pytest-rerunfailures=10.0
1011
- python=3.9.4
1112
- selenium=3.141.0
1213
- wheel=0.36.2

tests/requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
wheel
22
selenium
33
pytest
4+
pytest-rerunfailures
45
pycurl

tests/requirements.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ pycurl==7.43.0.6
1818
# via -r requirements.in
1919
pyparsing==2.4.7
2020
# via packaging
21-
pytest==6.2.4
21+
pytest-rerunfailures==10.0
2222
# via -r requirements.in
23+
pytest==6.2.4
24+
# via
25+
# -r requirements.in
26+
# pytest-rerunfailures
2327
selenium==3.141.0
2428
# via -r requirements.in
2529
toml==0.10.2
@@ -28,3 +32,6 @@ urllib3==1.26.5
2832
# via selenium
2933
wheel==0.36.2
3034
# via -r requirements.in
35+
36+
# The following packages are considered to be unsafe in a requirements file:
37+
# setuptools

0 commit comments

Comments
 (0)