Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Corrected a bug in [7876] picked up by the buildbot: depending on the…

… order in which tests are run, some tests would fail because of a dependency on the current working directory.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 9376d4e commit e18fccc62e6463c9247892bce7fd5ce125b526ac @freakboy3742 freakboy3742 committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/regressiontests/admin_scripts/
4 tests/regressiontests/admin_scripts/
@@ -58,6 +58,7 @@ def run_test(self, script, args, settings_file=None, apps=None):
# Remember the old environment
old_django_settings_module = os.environ.get('DJANGO_SETTINGS_MODULE', None)
old_python_path = os.environ.get('PYTHONPATH', None)
+ old_cwd = os.getcwd()
# Set the test environment
if settings_file:
@@ -77,6 +78,9 @@ def run_test(self, script, args, settings_file=None, apps=None):
os.environ['DJANGO_SETTINGS_MODULE'] = old_django_settings_module
if old_python_path:
os.environ['PYTHONPATH'] = old_python_path
+ # Move back to the old working directory
+ os.chdir(old_cwd)
return out, err

0 comments on commit e18fccc

Please sign in to comment.
Something went wrong with that request. Please try again.