diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2023-01-14 11:13:55 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2023-01-14 11:13:55 -0500 |
| commit | 245da5441248eeb2d575034d04cbc241bf545161 (patch) | |
| tree | d76526e1461252cc1119cd9482a64ef1e75f7838 /setuptools/command/test.py | |
| parent | d7b783a4b8b01e58135e40bd9a1db8a82c090982 (diff) | |
| parent | 82eee6a998251b33ab3984f39b25c27ca72ba8b0 (diff) | |
| download | python-setuptools-git-245da5441248eeb2d575034d04cbc241bf545161.tar.gz | |
Merge branch 'main' into debt/remove-legacy-version
Diffstat (limited to 'setuptools/command/test.py')
| -rw-r--r-- | setuptools/command/test.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 4a389e4d..8dde513c 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -16,10 +16,11 @@ from pkg_resources import ( evaluate_marker, add_activation_listener, require, - EntryPoint, ) +from .._importlib import metadata from setuptools import Command from setuptools.extern.more_itertools import unique_everseen +from setuptools.extern.jaraco.functools import pass_none class ScanningLoader(TestLoader): @@ -117,7 +118,7 @@ class test(Command): return list(self._test_args()) def _test_args(self): - if not self.test_suite and sys.version_info >= (2, 7): + if not self.test_suite: yield 'discover' if self.verbose: yield '--verbose' @@ -241,12 +242,10 @@ class test(Command): return ['unittest'] + self.test_args @staticmethod + @pass_none def _resolve_as_ep(val): """ Load the indicated attribute value, called, as a as if it were specified as an entry point. """ - if val is None: - return - parsed = EntryPoint.parse("x=" + val) - return parsed.resolve()() + return metadata.EntryPoint(value=val, name=None, group=None).load()() |
