Commit e18fccc6 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

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

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
parent 9376d4ed
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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:
@@ -78,6 +79,9 @@ class AdminScriptTestCase(unittest.TestCase):
        if old_python_path:
            os.environ['PYTHONPATH'] = old_python_path

        # Move back to the old working directory
        os.chdir(old_cwd)
        
        return out, err
        
    def run_django_admin(self, args, settings_file=None):