summaryrefslogtreecommitdiff
path: root/setuptools/command/test.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-08-16 00:29:24 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-08-16 07:15:18 -0400
commitfb7ab81a3d080422687bad71f9ae9d36eeefbee2 (patch)
treed87a9f6fdf32ab64334e1eb8a695949a88a3b043 /setuptools/command/test.py
parent4eb5b32f8d8bb1e20907028a516346e2b1901391 (diff)
downloadpython-setuptools-git-fb7ab81a3d080422687bad71f9ae9d36eeefbee2.tar.gz
Remove Python 2 compatibility
Diffstat (limited to 'setuptools/command/test.py')
-rw-r--r--setuptools/command/test.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index 2d83967d..cf71ad01 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -8,17 +8,12 @@ from distutils.errors import DistutilsError, DistutilsOptionError
from distutils import log
from unittest import TestLoader
-from setuptools.extern import six
-from setuptools.extern.six.moves import map, filter
-
from pkg_resources import (resource_listdir, resource_exists, normalize_path,
working_set, _namespace_packages, evaluate_marker,
add_activation_listener, require, EntryPoint)
from setuptools import Command
from .build_py import _unique_everseen
-__metaclass__ = type
-
class ScanningLoader(TestLoader):
@@ -129,8 +124,7 @@ class test(Command):
@contextlib.contextmanager
def project_on_sys_path(self, include_dists=[]):
- with_2to3 = not six.PY2 and getattr(
- self.distribution, 'use_2to3', False)
+ with_2to3 = getattr(self.distribution, 'use_2to3', False)
if with_2to3:
# If we run 2to3 we can not do this inplace:
@@ -241,7 +235,7 @@ class test(Command):
# Purge modules under test from sys.modules. The test loader will
# re-import them from the build location. Required when 2to3 is used
# with namespace packages.
- if not six.PY2 and getattr(self.distribution, 'use_2to3', False):
+ if getattr(self.distribution, 'use_2to3', False):
module = self.test_suite.split('.')[0]
if module in _namespace_packages:
del_modules = []