diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-19 14:33:42 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-19 14:33:42 -0500 |
| commit | 3463820b30f2b09fee9a5fe42f86f5fe53d7f185 (patch) | |
| tree | 8573f0834fdbbef8b6bd91abf0bdaec892a6ca1e /setuptools/command/test.py | |
| parent | bbf825eee764cae0bc44077ccc957a733d53d095 (diff) | |
| parent | c9fb0772fb3c147fce7affe7fcd0aa96435005d2 (diff) | |
| download | external_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.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 = [] |
