aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/test.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-01-19 14:33:42 -0500
committerJason R. Coombs <jaraco@jaraco.com>2020-01-19 14:33:42 -0500
commit3463820b30f2b09fee9a5fe42f86f5fe53d7f185 (patch)
tree8573f0834fdbbef8b6bd91abf0bdaec892a6ca1e /setuptools/command/test.py
parentbbf825eee764cae0bc44077ccc957a733d53d095 (diff)
parentc9fb0772fb3c147fce7affe7fcd0aa96435005d2 (diff)
downloadexternal_python_setuptools-3463820b30f2b09fee9a5fe42f86f5fe53d7f185.tar.gz
external_python_setuptools-3463820b30f2b09fee9a5fe42f86f5fe53d7f185.tar.bz2
external_python_setuptools-3463820b30f2b09fee9a5fe42f86f5fe53d7f185.zip
Merge branch 'master' into patch-1
Diffstat (limited to 'setuptools/command/test.py')
-rw-r--r--setuptools/command/test.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index c148b38d..2d83967d 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -129,7 +129,8 @@ class test(Command):
@contextlib.contextmanager
def project_on_sys_path(self, include_dists=[]):
- with_2to3 = six.PY3 and getattr(self.distribution, 'use_2to3', False)
+ with_2to3 = not six.PY2 and getattr(
+ self.distribution, 'use_2to3', False)
if with_2to3:
# If we run 2to3 we can not do this inplace:
@@ -240,7 +241,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 six.PY3 and getattr(self.distribution, 'use_2to3', False):
+ if not six.PY2 and getattr(self.distribution, 'use_2to3', False):
module = self.test_suite.split('.')[0]
if module in _namespace_packages:
del_modules = []