Skip to content

Pytest documentation + build tweaks #8026

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 14 commits into from
Feb 20, 2017
Merged
Prev Previous commit
Next Next commit
Change setup to require pytest instead of nose.
  • Loading branch information
QuLogic committed Feb 16, 2017
commit 25192ea0b9d95e2ceef6b77b1831a1d8f02e3d12
2 changes: 1 addition & 1 deletion ci/conda_recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ requirements:
- freetype 2.6*
- msinttypes # [win]
- cycler >=0.10
- nose
- pytest >=3.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- pyparsing
- pytz
# - py2cairo # [linux and py2k]
Expand Down
22 changes: 11 additions & 11 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,28 +788,28 @@ def get_namespace_packages(self):

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

def check(self):
super(Tests, self).check()

msgs = []
msg_template = ('{package} is required to run the matplotlib test '
'suite. Please install it with pip or your preferred'
' tool to run the test suite')
msg_template = ('{package} is required to run the Matplotlib test '
'suite. Please install it with pip or your preferred '
'tool to run the test suite')

bad_nose = msg_template.format(
package='nose %s or later' % self.nose_min_version
bad_pytest = msg_template.format(
package='pytest %s or later' % self.pytest_min_version
)
try:
import nose
if is_min_version(nose.__version__, self.nose_min_version):
msgs += ['using nose version %s' % nose.__version__]
import pytest
if is_min_version(pytest.__version__, self.pytest_min_version):
msgs += ['using pytest version %s' % pytest.__version__]
else:
msgs += [bad_nose]
msgs += [bad_pytest]
except ImportError:
msgs += [bad_nose]
msgs += [bad_pytest]

if PY3min:
msgs += ['using unittest.mock']
Expand Down