Fix python 3 path for shell test cases

This commit is contained in:
Daniel A. Wozniak 2019-01-30 03:13:21 -07:00
parent 48062c89a7
commit ae351eb055
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61

View file

@ -275,7 +275,10 @@ class ShellTestCase(TestCase, AdaptedConfigurationTestCaseMixin):
popen_kwargs['cwd'] = os.getcwd()
if 'env' not in popen_kwargs:
popen_kwargs['env'] = os.environ.copy()
popen_kwargs['env'][b'PYTHONPATH'] = os.getcwd().encode()
if sys.version_info[0] < 3:
popen_kwargs['env'][b'PYTHONPATH'] = os.getcwd().encode()
else:
popen_kwargs['env']['PYTHONPATH'] = os.getcwd()
else:
cmd = 'PYTHONPATH='
python_path = os.environ.get('PYTHONPATH', None)