Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3441571

Browse files
authored
Merge pull request #9317 from anntzer/test-oldest-pytest
On 2.7, run tests on oldest documented supported pytest and pytest-cov.
2 parents 3700451 + 57c8f18 commit 3441571

5 files changed

Lines changed: 42 additions & 20 deletions

File tree

.travis.yml

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,43 @@ env:
4545
- secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
4646
- secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
4747
- secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU="
48+
- CYCLER=cycler
49+
- DATEUTIL=python-dateutil
50+
- MOCK=
51+
- NOSE=
4852
- NUMPY=numpy
49-
- OPENBLAS_NUM_THREADS=1
5053
- PANDAS=
54+
- PYPARSING=pyparsing
55+
- PYTEST=pytest!=3.3.0
56+
- PYTEST_COV=pytest-cov
57+
- PYTEST_PEP8=
58+
- SPHINX=sphinx
59+
- OPENBLAS_NUM_THREADS=1
5160
- NPROC=2
52-
- INSTALL_PEP8=
5361
- RUN_PEP8=
54-
- NOSE=
5562
- PYTEST_ARGS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
5663
- PYTHON_ARGS=
5764
- DELETE_FONT_CACHE=
5865

5966
matrix:
6067
include:
6168
- python: 2.7
62-
env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS=pandas NOSE=nose
69+
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124.
70+
env:
71+
- CYCLER=cycler==0.10
72+
- DATEUTIL=python-dateutil==2.1
73+
- MOCK=mock
74+
- NOSE=nose
75+
- NUMPY=numpy==1.7.1
76+
- PANDAS='pandas<0.21.0'
77+
- PYPARSING=pyparsing==2.0.1
78+
- PYTEST=pytest==3.1.0
79+
- PYTEST_COV=pytest-cov==2.3.1
80+
- SPHINX=sphinx==1.3
6381
- python: 3.4
6482
env: PYTHON_ARGS=-OO
6583
- python: 3.6
66-
env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8 PANDAS=pandas
84+
env: DELETE_FONT_CACHE=1 PANDAS='pandas<0.21.0' PYTEST_PEP8=pytest-pep8 RUN_PEP8=--pep8
6785
- python: "nightly"
6886
env: PRE=--pre
6987
- os: osx
@@ -110,16 +128,21 @@ install:
110128
# Upgrade pip and setuptools and wheel to get as clean an install as possible
111129
pip install --upgrade pip setuptools wheel
112130
- |
113-
# Install dependencies from pypi
131+
# Install dependencies from PyPI
114132
pip install --upgrade $PRE \
133+
codecov \
134+
coverage \
135+
$CYCLER \
115136
$MOCK \
116137
$NOSE \
117138
$NUMPY \
118139
$PANDAS \
119140
codecov \
120141
coverage \
121142
pillow \
122-
sphinx
143+
$PYPARSING \
144+
$DATEUTIL \
145+
$SPHINX
123146
# GUI toolkits are pip-installable only for some versions of Python so
124147
# don't fail if we can't install them. Make it easier to check whether the
125148
# install was successful by trying to import the toolkit (sometimes, the
@@ -140,15 +163,14 @@ install:
140163
echo 'wxPython is available' ||
141164
echo 'wxPython is not available'
142165
143-
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
144166
pip install $PRE \
145-
pytest!=3.3.0 \
146-
pytest-cov>=2.3.1 \
167+
$PYTEST \
168+
$PYTEST_COV \
147169
pytest-faulthandler \
170+
$PYTEST_PEP8 \
148171
pytest-rerunfailures \
149172
pytest-timeout \
150-
pytest-xdist \
151-
$INSTALL_PEP8
173+
pytest-xdist
152174
153175
# Use the special local version of freetype for testing
154176
cp ci/travis/setup.cfg .

INSTALL.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Matplotlib requires a large number of dependencies:
170170
* `Python <https://www.python.org/downloads/>`_ (>= 2.7 or >= 3.4)
171171
* `NumPy <http://www.numpy.org>`_ (>= |minimum_numpy_version|)
172172
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`__
173-
* `dateutil <https://pypi.python.org/pypi/python-dateutil>`_ (>= 2.0)
173+
* `dateutil <https://pypi.python.org/pypi/python-dateutil>`_ (>= 2.1)
174174
* `pyparsing <https://pyparsing.wikispaces.com/>`__
175175
* `libpng <http://www.libpng.org>`__ (>= 1.2)
176176
* `pytz <http://pytz.sourceforge.net/>`__

doc/devel/contributing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ environment is set up properly::
152152

153153
.. note::
154154

155-
**Additional dependencies for testing**: pytest_ (version 3.0 or later),
156-
mock_ (if python < 3.3), Ghostscript_, Inkscape_
155+
**Additional dependencies for testing**: pytest_ (version 3.1 or later),
156+
mock_ (if Python 2), Ghostscript_, Inkscape_
157157

158158
.. seealso::
159159

doc/devel/testing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ local FreeType build
2626

2727
The following software is required to run the tests:
2828

29-
- pytest_, version 3.0.0 or later
30-
- mock_, when running Python versions < 3.3
29+
- pytest_ (>=3.1)
30+
- mock_, when running Python 2
3131
- Ghostscript_ (to render PDF files)
3232
- Inkscape_ (to render SVG files)
3333

3434
Optionally you can install:
3535

36-
- pytest-cov_ to collect coverage information
36+
- pytest-cov_ (>=2.3.1) to collect coverage information
3737
- pytest-pep8_ to test coding standards
3838
- pytest-timeout_ to limit runtime in case of stuck tests
3939
- pytest-xdist_ to run tests in parallel

setupext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ def get_namespace_packages(self):
810810

811811
class Tests(OptionalPackage):
812812
name = "tests"
813-
pytest_min_version = '3.0.0'
813+
pytest_min_version = '3.1'
814814
default_config = False
815815

816816
def check(self):
@@ -1457,7 +1457,7 @@ def get_install_requires(self):
14571457
install_requires = [
14581458
"cycler>=0.10",
14591459
"pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6",
1460-
"python-dateutil>=2.0",
1460+
"python-dateutil>=2.1",
14611461
"pytz",
14621462
"six>=1.10",
14631463
]

0 commit comments

Comments
 (0)