Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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: http://code.djangoproject.com/svn/django/trunk@7877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e18fccc62e6463c9247892bce7fd5ce125b526ac 1 parent 9376d4e
Russell Keith-Magee authored
4  tests/regressiontests/admin_scripts/tests.py
@@ -58,6 +58,7 @@ def run_test(self, script, args, settings_file=None, apps=None):
58 58
         # Remember the old environment
59 59
         old_django_settings_module = os.environ.get('DJANGO_SETTINGS_MODULE', None)
60 60
         old_python_path = os.environ.get('PYTHONPATH', None)
  61
+        old_cwd = os.getcwd()
61 62
         
62 63
         # Set the test environment
63 64
         if settings_file:
@@ -77,6 +78,9 @@ def run_test(self, script, args, settings_file=None, apps=None):
77 78
             os.environ['DJANGO_SETTINGS_MODULE'] = old_django_settings_module
78 79
         if old_python_path:
79 80
             os.environ['PYTHONPATH'] = old_python_path
  81
+
  82
+        # Move back to the old working directory
  83
+        os.chdir(old_cwd)
80 84
         
81 85
         return out, err
82 86
         

0 notes on commit e18fccc

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