Skip to content

Commit b32d5bf

Browse files
authored
Add test execution times and a timeout of 600s (#849)
* Add test execution times and a timeout of 600s * Show only 50 slowest test times * Use actual timeout flag * Add pytest-timeout to tox deps for optional dep tests to pass
1 parent 60b8cbf commit b32d5bf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

requirements/dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pytest-cov>=2.6.1, <5.0.0
99
pytest-xdist>=1.28.0, <4.0.0 # for distributed testing, currently unused (see setup.cfg)
1010
pytest-lazy-fixture>=0.6.3, <0.7.0
1111
pytest-custom_exit_code>=0.3.0 # for notebook tests
12-
pytest-timeout>=1.4.2, <3.0.0 # for notebook tests
12+
pytest-timeout>=1.4.2, <3.0.0 # for notebook and regular tests
1313
pytest-mock>=3.10.0, <4.0.0
1414
jupytext>=1.12.0, <2.0.0 # for notebook tests
1515
ipykernel>=5.1.0, <7.0.0 # for notebook tests

setup.cfg

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ addopts =
77
-W ignore
88
--cov=alibi
99
--cov-append
10+
--durations=50
11+
--durations-min=1.0
12+
--timeout=600
1013
# -n auto
1114
# --forked
1215
markers =
@@ -67,6 +70,7 @@ commands =
6770
basepython = python
6871
deps = pytest
6972
pytest-cov
73+
pytest-timeout
7074
passenv = COMMAND
7175
commands = {env:COMMAND:pytest --no-cov alibi/tests/test_dep_management.py --opt-dep=default}
7276

@@ -75,6 +79,7 @@ commands = {env:COMMAND:pytest --no-cov alibi/tests/test_dep_management.py --opt
7579
basepython = python
7680
deps = pytest
7781
pytest-cov
82+
pytest-timeout
7883
extras=
7984
ray
8085
passenv = COMMAND
@@ -85,6 +90,7 @@ commands = {env:COMMAND:pytest --no-cov alibi/tests/test_dep_management.py --opt
8590
basepython = python
8691
deps = pytest
8792
pytest-cov
93+
pytest-timeout
8894
extras=
8995
tensorflow
9096
commands =
@@ -95,6 +101,7 @@ commands =
95101
basepython = python
96102
deps = pytest
97103
pytest-cov
104+
pytest-timeout
98105
extras=
99106
torch
100107
commands =
@@ -105,6 +112,7 @@ commands =
105112
basepython = python
106113
deps = pytest
107114
pytest-cov
115+
pytest-timeout
108116
extras=
109117
shap
110118
commands =
@@ -115,6 +123,7 @@ commands =
115123
basepython = python
116124
deps = pytest
117125
pytest-cov
126+
pytest-timeout
118127
extras=
119128
all
120129
commands =

0 commit comments

Comments
 (0)