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

Skip to content

Commit c72d3fc

Browse files
dstansbytacaswell
authored andcommitted
Merge pull request #9317 from anntzer/test-oldest-pytest
On 2.7, run tests on oldest documented supported pytest and pytest-cov. Conflicts: .travis.yml - keep version from master setupext.py - keep version from v2.1.x
1 parent b503d6a commit c72d3fc

File tree

5 files changed

+42
-22
lines changed

5 files changed

+42
-22
lines changed

.travis.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,43 @@ env:
4040
- secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
4141
- secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
4242
- secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU="
43+
- CYCLER=cycler
44+
- DATEUTIL=python-dateutil
45+
- MOCK=
46+
- NOSE=
4347
- NUMPY=numpy
44-
- OPENBLAS_NUM_THREADS=1
4548
- PANDAS=
49+
- PYPARSING=pyparsing
50+
- PYTEST=pytest!=3.3.0
51+
- PYTEST_COV=pytest-cov
52+
- PYTEST_PEP8=
53+
- SPHINX=sphinx
54+
- OPENBLAS_NUM_THREADS=1
4655
- NPROC=2
47-
- INSTALL_PEP8=
4856
- RUN_PEP8=
49-
- NOSE=
5057
- PYTEST_ARGS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
5158
- PYTHON_ARGS=
5259
- DELETE_FONT_CACHE=
5360

5461
matrix:
5562
include:
5663
- python: 2.7
57-
env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS=pandas NOSE=nose
64+
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124.
65+
env:
66+
- CYCLER=cycler==0.10
67+
- DATEUTIL=python-dateutil==2.1
68+
- MOCK=mock
69+
- NOSE=nose
70+
- NUMPY=numpy==1.7.1
71+
- PANDAS='pandas<0.21.0'
72+
- PYPARSING=pyparsing==2.0.1
73+
- PYTEST=pytest==3.1.0
74+
- PYTEST_COV=pytest-cov==2.3.1
75+
- SPHINX=sphinx==1.3
5876
- python: 3.4
5977
env: PYTHON_ARGS=-OO
6078
- python: 3.6
61-
env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8 PANDAS=pandas
79+
env: DELETE_FONT_CACHE=1 PANDAS='pandas<0.21.0' PYTEST_PEP8=pytest-pep8 RUN_PEP8=--pep8
6280
- python: "nightly"
6381
env: PRE=--pre
6482
- os: osx
@@ -105,8 +123,11 @@ install:
105123
# Upgrade pip and setuptools and wheel to get as clean an install as possible
106124
pip install --upgrade pip setuptools wheel
107125
- |
108-
# Install dependencies from pypi
126+
# Install dependencies from PyPI
109127
pip install --upgrade $PRE \
128+
codecov \
129+
coverage \
130+
$CYCLER \
110131
$MOCK \
111132
$NOSE \
112133
$NUMPY \
@@ -115,9 +136,9 @@ install:
115136
coverage \
116137
cycler \
117138
pillow \
118-
pyparsing!=2.1.6 \
119-
python-dateutil \
120-
sphinx
139+
$PYPARSING \
140+
$DATEUTIL \
141+
$SPHINX
121142
# GUI toolkits are pip-installable only for some versions of Python so
122143
# don't fail if we can't install them. Make it easier to check whether the
123144
# install was successful by trying to import the toolkit (sometimes, the
@@ -134,15 +155,14 @@ install:
134155
echo 'wxPython is available' ||
135156
echo 'wxPython is not available'
136157
137-
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
138158
pip install $PRE \
139-
pytest!=3.3.0 \
140-
pytest-cov>=2.3.1 \
159+
$PYTEST \
160+
$PYTEST_COV \
141161
pytest-faulthandler \
162+
$PYTEST_PEP8 \
142163
pytest-rerunfailures \
143164
pytest-timeout \
144-
pytest-xdist \
145-
$INSTALL_PEP8
165+
pytest-xdist
146166
147167
# Use the special local version of freetype for testing
148168
cp ci/travis/setup.cfg .

INSTALL.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Matplotlib requires a large number of dependencies:
176176
* `Python <https://www.python.org/downloads/>`_ (>= 2.7 or >= 3.4)
177177
* `NumPy <http://www.numpy.org>`_ (>= |minimum_numpy_version|)
178178
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`__
179-
* `dateutil <https://pypi.python.org/pypi/python-dateutil>`_ (>= 2.0)
179+
* `dateutil <https://pypi.python.org/pypi/python-dateutil>`_ (>= 2.1)
180180
* `pyparsing <https://pyparsing.wikispaces.com/>`__
181181
* `libpng <http://www.libpng.org>`__ (>= 1.2)
182182
* `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
@@ -788,7 +788,7 @@ def get_namespace_packages(self):
788788

789789
class Tests(OptionalPackage):
790790
name = "tests"
791-
pytest_min_version = '3.0.0'
791+
pytest_min_version = '3.1'
792792
default_config = False
793793

794794
def check(self):
@@ -1510,7 +1510,7 @@ def get_install_requires(self):
15101510
class Dateutil(SetupPackage):
15111511
name = "dateutil"
15121512

1513-
def __init__(self, version='>=2.0'):
1513+
def __init__(self, version='>=2.1'):
15141514
self.version = version
15151515

15161516
def check(self):

0 commit comments

Comments
 (0)