summaryrefslogtreecommitdiff
path: root/setuptools/command/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/test.py')
-rw-r--r--setuptools/command/test.py11
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()()