From de77e29507ad2533fd8837920dbbf7a8ddabe1a3 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 1 Jan 2019 23:00:43 +0100 Subject: [PATCH] Drop pytest version check in setupext.py. There's already a better check from the minversion entry in pytest.ini, which will actually error out cleanly if trying to run the tests with a too-old pytest. --- setupext.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/setupext.py b/setupext.py index a5163e392885..9ef6c101af48 100644 --- a/setupext.py +++ b/setupext.py @@ -656,31 +656,8 @@ def get_package_data(self): class Tests(OptionalPackage): name = "tests" - pytest_min_version = '3.6' default_config = True - def check(self): - super().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') - - bad_pytest = msg_template.format( - package='pytest %s or later' % self.pytest_min_version - ) - try: - import pytest - if is_min_version(pytest.__version__, self.pytest_min_version): - msgs += ['using pytest version %s' % pytest.__version__] - else: - msgs += [bad_pytest] - except ImportError: - msgs += [bad_pytest] - - return ' / '.join(msgs) - def get_packages(self): return setuptools.find_packages("lib", include=["*.tests"])