Skip to content

Commit 8f052de

Browse files
authored
CI: use pytest-timeout to avoid windows timeouts (#44814)
1 parent 6529551 commit 8f052de

20 files changed

+24
-2
lines changed

.github/workflows/python-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
python -m pip install --upgrade pip setuptools wheel
5252
pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
5353
pip install git+https://github.com/nedbat/coveragepy.git
54-
pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov
54+
pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov pytest-timeout
5555
pip list
5656
5757
- name: Build Pandas

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
4444
. ~/virtualenvs/pandas-dev/bin/activate && \
4545
python -m pip install --no-deps -U pip wheel setuptools && \
46-
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
46+
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines pytest-timeout && \
4747
python setup.py build_ext -q -j2 && \
4848
python -m pip install --no-build-isolation -e . && \
4949
pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml"

ci/deps/actions-38-db-min.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.31
12+
- pytest-timeout
1213
- hypothesis>=5.5.3
1314

1415
# required

ci/deps/actions-38-db.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
- cython>=0.29.24
99
- pytest>=6.0
1010
- pytest-xdist>=1.31
11+
- pytest-timeout
1112
- hypothesis>=5.5.3
1213
- pytest-cov>=2.10.1 # this is only needed in the coverage build, ref: GH 35737
1314

ci/deps/actions-38-locale.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.31
12+
- pytest-timeout
1213
- pytest-asyncio>=0.12.0
1314
- hypothesis>=5.5.3
1415

ci/deps/actions-38-locale_slow.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- pytest>=6.0
1111
- pytest-cov
1212
- pytest-xdist>=1.31
13+
- pytest-timeout
1314
- hypothesis>=5.5.3
1415

1516
# pandas dependencies

ci/deps/actions-38-minimum_versions.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.31
12+
- pytest-timeout
1213
- hypothesis>=5.5.3
1314
- psutil
1415

ci/deps/actions-38-slow.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.31
12+
- pytest-timeout
1213
- hypothesis>=5.5.3
1314

1415
# pandas dependencies

ci/deps/actions-38.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- pytest>=6.0
1111
- pytest-cov
1212
- pytest-xdist>=1.31
13+
- pytest-timeout
1314
- hypothesis>=5.5.3
1415

1516
# pandas dependencies

ci/deps/actions-39-numpydev.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
- pytest>=6.0
99
- pytest-cov
1010
- pytest-xdist>=1.31
11+
- pytest-timeout
1112
- hypothesis>=5.5.3
1213

1314
# pandas dependencies

ci/deps/actions-39-slow.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- pytest>=6.0
1111
- pytest-cov
1212
- pytest-xdist>=1.31
13+
- pytest-timeout
1314
- hypothesis>=5.5.3
1415

1516
# pandas dependencies

ci/deps/actions-39.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.31
12+
- pytest-timeout
1213
- hypothesis>=5.5.3
1314

1415
# pandas dependencies

ci/deps/azure-macos-38.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
# tools
99
- pytest>=6.0
1010
- pytest-xdist>=1.31
11+
- pytest-timeout
1112
- hypothesis>=5.5.3
1213
- pytest-azurepipelines
1314

ci/deps/azure-windows-38.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- cython>=0.29.24
1010
- pytest>=6.0
1111
- pytest-xdist>=1.31
12+
- pytest-timeout
1213
- hypothesis>=5.5.3
1314
- pytest-azurepipelines
1415

ci/deps/azure-windows-39.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- cython>=0.29.24
1010
- pytest>=6.0
1111
- pytest-xdist>=1.31
12+
- pytest-timeout
1213
- hypothesis>=5.5.3
1314
- pytest-azurepipelines
1415

ci/deps/circle-38-arm64.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
- cython>=0.29.24
99
- pytest>=6.0
1010
- pytest-xdist>=1.31
11+
- pytest-timeout
1112
- hypothesis>=5.5.3
1213

1314
# pandas dependencies

environment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ dependencies:
6161
- pytest>=6.0
6262
- pytest-cov
6363
- pytest-xdist>=1.31
64+
- pytest-timeout
6465
- pytest-asyncio
6566
- pytest-instafail
6667

pandas/tests/io/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@
2424
pytest.mark.filterwarnings(
2525
"ignore:As the xlwt package is no longer maintained:FutureWarning"
2626
),
27+
# Troubleshooting build failures that look like network timeouts
28+
pytest.mark.timeout(60),
2729
]

pandas/tests/io/test_user_agent.py

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
import pandas as pd
1414
import pandas._testing as tm
1515

16+
# Troubleshooting build failures on Windows that tentatively look like
17+
# they are stalling in this file.
18+
pytestmark = pytest.mark.timeout(60)
19+
1620

1721
class BaseUserAgentResponder(http.server.BaseHTTPRequestHandler):
1822
"""

requirements-dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ flask
3939
pytest>=6.0
4040
pytest-cov
4141
pytest-xdist>=1.31
42+
pytest-timeout
4243
pytest-asyncio
4344
pytest-instafail
4445
seaborn

0 commit comments

Comments
 (0)