Django

Code

Changeset 7877

Show
Ignore:
Timestamp:
07/10/08 08:53:45 (5 months ago)
Author:
russellm
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/regressiontests/admin_scripts/tests.py

    r7876 r7877  
    5959        old_django_settings_module = os.environ.get('DJANGO_SETTINGS_MODULE', None) 
    6060        old_python_path = os.environ.get('PYTHONPATH', None) 
     61        old_cwd = os.getcwd() 
    6162         
    6263        # Set the test environment 
     
    7879        if old_python_path: 
    7980            os.environ['PYTHONPATH'] = old_python_path 
     81 
     82        # Move back to the old working directory 
     83        os.chdir(old_cwd) 
    8084         
    8185        return out, err