Skip to content

Commit f85d11c

Browse files
committed
Removed support for tests_require and other test command parameters.
1 parent 6929cc4 commit f85d11c

File tree

7 files changed

+0
-37
lines changed

7 files changed

+0
-37
lines changed

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,15 @@ eager_resources = "setuptools.dist:assert_string_list"
129129
namespace_packages = "setuptools.dist:check_nsp"
130130
extras_require = "setuptools.dist:check_extras"
131131
install_requires = "setuptools.dist:check_requirements"
132-
tests_require = "setuptools.dist:check_requirements"
133132
setup_requires = "setuptools.dist:check_requirements"
134133
python_requires = "setuptools.dist:check_specifier"
135134
entry_points = "setuptools.dist:check_entry_points"
136-
test_suite = "setuptools.dist:check_test_suite"
137135
zip_safe = "setuptools.dist:assert_bool"
138136
package_data = "setuptools.dist:check_package_data"
139137
exclude_package_data = "setuptools.dist:check_package_data"
140138
include_package_data = "setuptools.dist:assert_bool"
141139
packages = "setuptools.dist:check_packages"
142140
dependency_links = "setuptools.dist:assert_string_list"
143-
test_loader = "setuptools.dist:check_importable"
144-
test_runner = "setuptools.dist:check_importable"
145141
use_2to3 = "setuptools.dist:invalid_unless_false"
146142

147143
[project.entry-points."egg_info.writers"]

setuptools/config/setupcfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,6 @@ def parsers(self):
646646
self._parse_requirements_list, "install_requires"
647647
),
648648
'setup_requires': self._parse_list_semicolon,
649-
'tests_require': self._parse_list_semicolon,
650649
'packages': self._parse_packages,
651650
'entry_points': self._parse_file_in_root,
652651
'py_modules': parse_list,

setuptools/dist.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,6 @@ def check_entry_points(dist, attr, value):
170170
raise DistutilsSetupError(e) from e
171171

172172

173-
def check_test_suite(dist, attr, value):
174-
if not isinstance(value, str):
175-
raise DistutilsSetupError("test_suite must be a string")
176-
177-
178173
def check_package_data(dist, attr, value):
179174
"""Verify that value is a dictionary of package names to glob lists"""
180175
if not isinstance(value, dict):
@@ -235,12 +230,6 @@ class Distribution(_Distribution):
235230
EasyInstall and requests one of your extras, the corresponding
236231
additional requirements will be installed if needed.
237232
238-
'test_suite' -- the name of a test suite to run for the 'test' command.
239-
If the user runs 'python setup.py test', the package will be installed,
240-
and the named test suite will be run. The format is the same as
241-
would be used on a 'unittest.py' command line. That is, it is the
242-
dotted name of an object to import and call to generate a test suite.
243-
244233
'package_data' -- a dictionary mapping package names to lists of filenames
245234
or globs to use to find data files contained in the named packages.
246235
If the dictionary has filenames or globs listed under '""' (the empty

setuptools/tests/config/setupcfg_examples.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ https://github.com/pallets/click/raw/6411f425fae545f42795665af4162006b36c5e4a/se
1515
https://github.com/sqlalchemy/sqlalchemy/raw/533f5718904b620be8d63f2474229945d6f8ba5d/setup.cfg
1616
https://github.com/pytest-dev/pluggy/raw/461ef63291d13589c4e21aa182cd1529257e9a0a/setup.cfg
1717
https://github.com/pytest-dev/pytest/raw/c7be96dae487edbd2f55b561b31b68afac1dabe6/setup.cfg
18-
https://github.com/tqdm/tqdm/raw/fc69d5dcf578f7c7986fa76841a6b793f813df35/setup.cfg
1918
https://github.com/platformdirs/platformdirs/raw/7b7852128dd6f07511b618d6edea35046bd0c6ff/setup.cfg
2019
https://github.com/pandas-dev/pandas/raw/bc17343f934a33dc231c8c74be95d8365537c376/setup.cfg
2120
https://github.com/django/django/raw/4e249d11a6e56ca8feb4b055b681cec457ef3a3d/setup.cfg

setuptools/tests/config/test_apply_pyprojecttoml.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def test_apply_pyproject_equivalent_to_setupcfg(url, monkeypatch, tmp_path):
5151

5252
dist_toml = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject_example)
5353
dist_cfg = setupcfg.apply_configuration(makedist(tmp_path), setupcfg_example)
54-
_port_tests_require(dist_cfg)
5554

5655
pkg_info_toml = core_metadata(dist_toml)
5756
pkg_info_cfg = core_metadata(dist_cfg)
@@ -479,15 +478,3 @@ def core_metadata(dist) -> str:
479478
result.append(line + "\n")
480479

481480
return "".join(result)
482-
483-
484-
def _port_tests_require(dist):
485-
"""
486-
``ini2toml`` "forward fix" deprecated tests_require definitions by moving
487-
them into an extra called ``testing``.
488-
"""
489-
tests_require = getattr(dist, "tests_require", None) or []
490-
if tests_require:
491-
dist.tests_require = []
492-
dist.extras_require.setdefault("testing", []).extend(tests_require)
493-
dist._finalize_requires()

setuptools/tests/config/test_setupcfg.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ def test_basic(self, tmpdir):
465465
'scripts = bin/one.py, bin/two.py\n'
466466
'eager_resources = bin/one.py, bin/two.py\n'
467467
'install_requires = docutils>=0.3; pack ==1.1, ==1.3; hey\n'
468-
'tests_require = mock==0.7.2; pytest\n'
469468
'setup_requires = docutils>=0.3; spack ==1.1, ==1.3; there\n'
470469
'dependency_links = http://some.com/here/1, '
471470
'http://some.com/there/2\n'
@@ -494,7 +493,6 @@ def test_basic(self, tmpdir):
494493
'spack ==1.1, ==1.3',
495494
'there',
496495
])
497-
assert dist.tests_require == ['mock==0.7.2', 'pytest']
498496
assert dist.python_requires == '>=1.0, !=2.8'
499497
assert dist.py_modules == ['module1', 'module2']
500498

@@ -521,9 +519,6 @@ def test_multiline(self, tmpdir):
521519
' docutils>=0.3\n'
522520
' pack ==1.1, ==1.3\n'
523521
' hey\n'
524-
'tests_require = \n'
525-
' mock==0.7.2\n'
526-
' pytest\n'
527522
'setup_requires = \n'
528523
' docutils>=0.3\n'
529524
' spack ==1.1, ==1.3\n'
@@ -552,7 +547,6 @@ def test_multiline(self, tmpdir):
552547
'spack ==1.1, ==1.3',
553548
'there',
554549
])
555-
assert dist.tests_require == ['mock==0.7.2', 'pytest']
556550

557551
def test_package_dir_fail(self, tmpdir):
558552
fake_env(tmpdir, '[options]\npackage_dir = a b\n')

setuptools/tests/test_bdist_wheel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
setup_requires=["setuptools"],
9999
install_requires=["quux", "splort"],
100100
extras_require={"simple": ["simple.dist"]},
101-
tests_require=["foo", "bar>=10.0.0"],
102101
entry_points={
103102
"console_scripts": [
104103
"complex-dist=complexdist:main",

0 commit comments

Comments
 (0)