Skip to content

Commit

Permalink
CI: use pytest-timeout to avoid windows timeouts (pandas-dev#44814)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored Dec 8, 2021
1 parent 6529551 commit 8f052de
Show file tree
Hide file tree
Showing 20 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
pip install git+https://github.com/nedbat/coveragepy.git
pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov
pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov pytest-timeout
pip list
- name: Build Pandas
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
. ~/virtualenvs/pandas-dev/bin/activate && \
python -m pip install --no-deps -U pip wheel setuptools && \
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines pytest-timeout && \
python setup.py build_ext -q -j2 && \
python -m pip install --no-build-isolation -e . && \
pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml"
Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-38-db-min.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3

# required
Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-38-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- cython>=0.29.24
- pytest>=6.0
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3
- pytest-cov>=2.10.1 # this is only needed in the coverage build, ref: GH 35737

Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-38-locale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- pytest-asyncio>=0.12.0
- hypothesis>=5.5.3

Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-38-locale_slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3

# pandas dependencies
Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-38-minimum_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3
- psutil

Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-38-slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3

# pandas dependencies
Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-38.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3

# pandas dependencies
Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-39-numpydev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3

# pandas dependencies
Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-39-slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3

# pandas dependencies
Expand Down
1 change: 1 addition & 0 deletions ci/deps/actions-39.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3

# pandas dependencies
Expand Down
1 change: 1 addition & 0 deletions ci/deps/azure-macos-38.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
# tools
- pytest>=6.0
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3
- pytest-azurepipelines

Expand Down
1 change: 1 addition & 0 deletions ci/deps/azure-windows-38.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- cython>=0.29.24
- pytest>=6.0
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3
- pytest-azurepipelines

Expand Down
1 change: 1 addition & 0 deletions ci/deps/azure-windows-39.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- cython>=0.29.24
- pytest>=6.0
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3
- pytest-azurepipelines

Expand Down
1 change: 1 addition & 0 deletions ci/deps/circle-38-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- cython>=0.29.24
- pytest>=6.0
- pytest-xdist>=1.31
- pytest-timeout
- hypothesis>=5.5.3

# pandas dependencies
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dependencies:
- pytest>=6.0
- pytest-cov
- pytest-xdist>=1.31
- pytest-timeout
- pytest-asyncio
- pytest-instafail

Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@
pytest.mark.filterwarnings(
"ignore:As the xlwt package is no longer maintained:FutureWarning"
),
# Troubleshooting build failures that look like network timeouts
pytest.mark.timeout(60),
]
4 changes: 4 additions & 0 deletions pandas/tests/io/test_user_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
import pandas as pd
import pandas._testing as tm

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


class BaseUserAgentResponder(http.server.BaseHTTPRequestHandler):
"""
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ flask
pytest>=6.0
pytest-cov
pytest-xdist>=1.31
pytest-timeout
pytest-asyncio
pytest-instafail
seaborn
Expand Down

0 comments on commit 8f052de

Please sign in to comment.