summaryrefslogtreecommitdiff
path: root/setuptools/command/test.py
diff options
context:
space:
mode:
authorBastian Venthur <bastian.venthur@flixbus.com>2020-02-11 09:55:35 +0100
committerBastian Venthur <bastian.venthur@flixbus.com>2020-02-11 09:55:35 +0100
commit087c3b26eed9b6a8960815c2773edd04b5c91a98 (patch)
treec0b0bf68b6f02980f742611c9232405ab9df299b /setuptools/command/test.py
parentc11270aa6bffd8913c6e074f09b9d920c8f19002 (diff)
parenta5dec2f14e3414e4ee5dd146bff9c289d573de9a (diff)
downloadpython-setuptools-git-087c3b26eed9b6a8960815c2773edd04b5c91a98.tar.gz
Merge branch 'master' into fix/1700
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 = []