Ticket #8268: 8268-r8371.diff

File 8268-r8371.diff, 1.3 KB (added by russellm, 7 years ago)

Possible patch for JYTHOPATH handling

  • tests/regressiontests/admin_scripts/tests.py

     
    8787        # Remember the old environment
    8888        old_django_settings_module = os.environ.get('DJANGO_SETTINGS_MODULE', None)
    8989        old_python_path = os.environ.get('PYTHONPATH', None)
     90        old_jython_path = os.environ.get('JYTHONPATH', None)
    9091        old_cwd = os.getcwd()
    9192
    9293        # Set the test environment
     
    9899        if ext_backend_base_dir:
    99100            python_path.append(ext_backend_base_dir)
    100101        os.environ['PYTHONPATH'] = os.pathsep.join(python_path)
     102        del os.environ['JYTHONPATH']
    101103
    102 
    103104        # Build the command line
    104105        cmd = '%s "%s"' % (self._sys_executable(), script)
    105106        cmd += ''.join([' %s' % arg for arg in args])
     
    119120            os.environ['DJANGO_SETTINGS_MODULE'] = old_django_settings_module
    120121        if old_python_path:
    121122            os.environ['PYTHONPATH'] = old_python_path
     123        if old_jython_path:
     124            os.environ['JYTHONPATH'] = old_jython_path
    122125        # Move back to the old working directory
    123126        os.chdir(old_cwd)
    124127
Back to Top