Kaydet (Commit) 0dc11a0c authored tarafından Russell Keith-Magee's avatar Russell Keith-Magee

Fixed #8029 -- Modified admin_scripts test to use the PYTHONPATH from the…

Fixed #8029 -- Modified admin_scripts test to use the PYTHONPATH from the environment where the test is executed. Thanks to Ramiro and Alex Gaynor for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8149 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 74dde439
......@@ -67,7 +67,10 @@ class AdminScriptTestCase(unittest.TestCase):
elif 'DJANGO_SETTINGS_MODULE' in os.environ:
del os.environ['DJANGO_SETTINGS_MODULE']
os.environ['PYTHONPATH'] = os.pathsep.join([test_dir,base_dir])
if old_python_path:
os.environ['PYTHONPATH'] = os.pathsep.join([test_dir, base_dir, old_python_path])
else:
os.environ['PYTHONPATH'] = os.pathsep.join([test_dir, base_dir])
# Move to the test directory and run
os.chdir(test_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment