diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2008-07-10 13:53:45 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2008-07-10 13:53:45 +0000 |
| commit | e18fccc62e6463c9247892bce7fd5ce125b526ac (patch) | |
| tree | 4fd3ec34fa481fc3ce0b575b0cdb5da1c2ccf606 /tests/regressiontests/admin_scripts | |
| parent | 9376d4ed5bd175eff87788ccf11e761fdef42b8b (diff) | |
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
Diffstat (limited to 'tests/regressiontests/admin_scripts')
| -rw-r--r-- | tests/regressiontests/admin_scripts/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py index 6a56f9114e..441ce10d07 100644 --- a/tests/regressiontests/admin_scripts/tests.py +++ b/tests/regressiontests/admin_scripts/tests.py @@ -58,6 +58,7 @@ class AdminScriptTestCase(unittest.TestCase): # 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 @@ class AdminScriptTestCase(unittest.TestCase): 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 |
