Skip to content

On 2.7, run tests on oldest documented supported pytest and pytest-cov. #9317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 34 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,43 @@ env:
- secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
- secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
- secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU="
- CYCLER=cycler
- DATEUTIL=python-dateutil
- MOCK=
- NOSE=
- NUMPY=numpy
- OPENBLAS_NUM_THREADS=1
- PANDAS=
- PYPARSING=pyparsing
- PYTEST=pytest!=3.3.0
- PYTEST_COV=pytest-cov
- PYTEST_PEP8=
- SPHINX=sphinx
- OPENBLAS_NUM_THREADS=1
- NPROC=2
- INSTALL_PEP8=
- RUN_PEP8=
- NOSE=
- PYTEST_ARGS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
- PYTHON_ARGS=
- DELETE_FONT_CACHE=

matrix:
include:
- python: 2.7
env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS=pandas NOSE=nose
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124.
env:
- CYCLER=cycler==0.10
- DATEUTIL=python-dateutil==2.1
- MOCK=mock
- NOSE=nose
- NUMPY=numpy==1.7.1
- PANDAS='pandas<0.21.0'
- PYPARSING=pyparsing==2.0.1
- PYTEST=pytest==3.1.0
- PYTEST_COV=pytest-cov==2.3.1
- SPHINX=sphinx==1.3
- python: 3.4
env: PYTHON_ARGS=-OO
- python: 3.6
env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8 PANDAS=pandas
env: DELETE_FONT_CACHE=1 PANDAS='pandas<0.21.0' PYTEST_PEP8=pytest-pep8 RUN_PEP8=--pep8
- python: "nightly"
env: PRE=--pre
- os: osx
Expand Down Expand Up @@ -108,16 +126,21 @@ install:
# Upgrade pip and setuptools and wheel to get as clean an install as possible
pip install --upgrade pip setuptools wheel
- |
# Install dependencies from pypi
# Install dependencies from PyPI
pip install --upgrade $PRE \
codecov \
coverage \
$CYCLER \
$MOCK \
$NOSE \
$NUMPY \
$PANDAS \
codecov \
coverage \
pillow \
sphinx
$PYPARSING \
$DATEUTIL \
$SPHINX
# GUI toolkits are pip-installable only for some versions of Python so
# don't fail if we can't install them. Make it easier to check whether the
# install was successful by trying to import the toolkit (sometimes, the
Expand All @@ -134,15 +157,14 @@ install:
echo 'wxPython is available' ||
echo 'wxPython is not available'

# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
pip install $PRE \
pytest!=3.3.0 \
pytest-cov>=2.3.1 \
$PYTEST \
$PYTEST_COV \
pytest-faulthandler \
$PYTEST_PEP8 \
pytest-rerunfailures \
pytest-timeout \
pytest-xdist \
$INSTALL_PEP8
pytest-xdist

# Use the special local version of freetype for testing
cp ci/travis/setup.cfg .
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Matplotlib requires a large number of dependencies:
* `Python <https://www.python.org/downloads/>`_ (>= 2.7 or >= 3.4)
* `NumPy <http://www.numpy.org>`_ (>= |minimum_numpy_version|)
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`__
* `dateutil <https://pypi.python.org/pypi/python-dateutil>`_ (>= 2.0)
* `dateutil <https://pypi.python.org/pypi/python-dateutil>`_ (>= 2.1)
* `pyparsing <https://pyparsing.wikispaces.com/>`__
* `libpng <http://www.libpng.org>`__ (>= 1.2)
* `pytz <http://pytz.sourceforge.net/>`__
Expand Down
4 changes: 2 additions & 2 deletions doc/devel/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ environment is set up properly::

.. note::

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

.. seealso::

Expand Down
6 changes: 3 additions & 3 deletions doc/devel/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ local FreeType build

The following software is required to run the tests:

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

Optionally you can install:

- pytest-cov_ to collect coverage information
- pytest-cov_ (>=2.3.1) to collect coverage information
- pytest-pep8_ to test coding standards
- pytest-timeout_ to limit runtime in case of stuck tests
- pytest-xdist_ to run tests in parallel
Expand Down
4 changes: 2 additions & 2 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ def get_namespace_packages(self):

class Tests(OptionalPackage):
name = "tests"
pytest_min_version = '3.0.0'
pytest_min_version = '3.1'
default_config = False

def check(self):
Expand Down Expand Up @@ -1465,7 +1465,7 @@ def get_install_requires(self):
install_requires = [
"cycler>=0.10",
"pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6",
"python-dateutil>=2.0",
"python-dateutil>=2.1",
"pytz",
"six>=1.10",
]
Expand Down