diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd46c43..be74222 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,6 @@ jobs: - name: Upgrade pip run: python -m pip install --upgrade pip - name: Install package - run: pip install -e . + run: pip install -e .[test] - name: Run tests run: python -bb -X dev -W ignore::UserWarning:setuptools.dist -m unittest -v pyroma.tests diff --git a/CHANGES.txt b/CHANGES.txt index 44e6dec..ce04232 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,7 +4,7 @@ Changelog 3.2.2 (unreleased) ------------------ -- Nothing changed yet. +- Add a deprecation for `test_suite` 3.2.1 (2022-03-27) diff --git a/pyroma/ratings.py b/pyroma/ratings.py index 421dc00..262ac6f 100644 --- a/pyroma/ratings.py +++ b/pyroma/ratings.py @@ -392,6 +392,16 @@ def message(self): return "You should have three or more owners of the project on PyPI." +class TestSuitDeprecation(BaseTest): + weight = 50 + + def test(self, data): + return "test_suite" not in data + + def message(self): + return "The `setup.py test` command and accompanying `test_suit` field has been deprecated." + + ALL_TESTS = [ Name(), Version(), @@ -411,6 +421,7 @@ def message(self): ValidREST(), BusFactor(), DevStatusClassifier(), + TestSuitDeprecation(), ] diff --git a/pyroma/testdata/complete/setup.py b/pyroma/testdata/complete/setup.py index 8331bd4..b0a8d87 100644 --- a/pyroma/testdata/complete/setup.py +++ b/pyroma/testdata/complete/setup.py @@ -32,5 +32,4 @@ tests_require=["six"], setup_requires=["setuptools"], zip_safe=True, - test_suite="complete", ) diff --git a/pyroma/testdata/distributions/complete-1.0.dev1.tar b/pyroma/testdata/distributions/complete-1.0.dev1.tar index 8888442..301a8df 100644 Binary files a/pyroma/testdata/distributions/complete-1.0.dev1.tar and b/pyroma/testdata/distributions/complete-1.0.dev1.tar differ diff --git a/pyroma/testdata/distributions/complete-1.0.dev1.tar.bz2 b/pyroma/testdata/distributions/complete-1.0.dev1.tar.bz2 index 684baaa..5f74c91 100644 Binary files a/pyroma/testdata/distributions/complete-1.0.dev1.tar.bz2 and b/pyroma/testdata/distributions/complete-1.0.dev1.tar.bz2 differ diff --git a/pyroma/testdata/distributions/complete-1.0.dev1.tar.gz b/pyroma/testdata/distributions/complete-1.0.dev1.tar.gz index c89f508..805ff8b 100644 Binary files a/pyroma/testdata/distributions/complete-1.0.dev1.tar.gz and b/pyroma/testdata/distributions/complete-1.0.dev1.tar.gz differ diff --git a/pyroma/testdata/distributions/complete-1.0.dev1.zip b/pyroma/testdata/distributions/complete-1.0.dev1.zip index f5a4c29..320e25e 100644 Binary files a/pyroma/testdata/distributions/complete-1.0.dev1.zip and b/pyroma/testdata/distributions/complete-1.0.dev1.zip differ diff --git a/pyroma/tests.py b/pyroma/tests.py index ab248f5..e73a631 100644 --- a/pyroma/tests.py +++ b/pyroma/tests.py @@ -39,7 +39,6 @@ "project_urls": {"Source Code": "https://github.com/regebro/pyroma"}, "license": "MIT", "zip_safe": True, - "test_suite": "complete", } diff --git a/setup.cfg b/setup.cfg index 0e4be90..444d4cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,6 @@ include_package_data = True packages = find: package_dir = = . -test_suite = pyroma.tests install_requires = setuptools docutils @@ -44,6 +43,7 @@ where = . test = pytest pytest-cov + setuptools>=60 [options.entry_points] console_scripts = @@ -66,4 +66,3 @@ testpaths = ignore = .pre-commit-hooks.yaml fetch_classifiers.py -