diff options
| author | Johannes Reiff <mail@jreiff.de> | 2020-01-25 14:17:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-25 14:17:40 +0100 |
| commit | 6ee1a1ce60c6d039c63def3c2aeba7e0f39e7507 (patch) | |
| tree | 254243b04be614ee4ea346ccb7c25fb9deb11f5f /setuptools/command/test.py | |
| parent | ec270f9e13fcc32a2a861273219ebfeba17838df (diff) | |
| parent | 73376585065bbf28395c71fe15137c19a712d4f3 (diff) | |
| download | python-setuptools-git-6ee1a1ce60c6d039c63def3c2aeba7e0f39e7507.tar.gz | |
Merge branch 'master' into pr-easyinstall
Diffstat (limited to 'setuptools/command/test.py')
| -rw-r--r-- | setuptools/command/test.py | 5 |
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 = [] |
