@@ -22,7 +22,10 @@ description = run tests
22
22
23
23
setenv =
24
24
PYTEST_ARGS = ' '
25
- online: PYTEST_ARGS = --remote-data =any --reruns =1 --reruns-delay 10 -m " not bigdata"
25
+ # We have two pytest runs for the online tests, need to suppress the failing status for the first one to be able to run the second.
26
+ online: PYTEST_ARGS = --remote-data =any -P sdss -m " not bigdata" --suppress-tests-failed-exit-code
27
+ online: PYTEST_ARGS_2 = --remote-data =any -vv -P sdss --last-failed -m " not bigdata"
28
+ online: SINGLE_RUN = False
26
29
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple
27
30
# astropy doesn't yet have a 3.13 compatible release
28
31
py313: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple
53
56
oldestdeps-alldeps: mocpy ==0.9
54
57
oldestdeps-alldeps: regions ==0.5
55
58
56
- online: pytest-rerunfailures
59
+ online: pytest-custom_exit_code
57
60
58
61
extras =
59
62
test
@@ -67,6 +70,10 @@ commands =
67
70
python -m pip freeze
68
71
!cov: pytest --pyargs astroquery {toxinidir}/docs {env:PYTEST_ARGS} {posargs}
69
72
cov: pytest --pyargs astroquery {toxinidir}/docs --cov astroquery --cov-config ={toxinidir}/setup.cfg {env:PYTEST_ARGS} {posargs}
73
+ # For remote tests, we re-run the failures to filter out at least some of the flaky ones.
74
+ # We use a second pytest run with --last-failed as opposed to --rerun in order to rerun the
75
+ # failed ones at the end rather than right away.
76
+ online: pytest --pyargs astroquery {toxinidir}/docs {env:PYTEST_ARGS_2} {posargs}
70
77
cov: coverage xml -o {toxinidir}/coverage.xml
71
78
72
79
pip_pre =
0 commit comments