Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed deletion of the runtests temp tree to work on Windows even when…

… the tree contains non-ASCII filenames.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5df784ab4293fb6740d062fe868be7bcafed348a 1 parent db2b145
Karen Tracey kmtracey authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 tests/runtests.py
7 tests/runtests.py
View
@@ -130,8 +130,11 @@ def setup(verbosity, test_labels):
def teardown(state):
from django.conf import settings
- # Removing the temporary TEMP_DIR
- shutil.rmtree(TEMP_DIR)
+ # Removing the temporary TEMP_DIR. Ensure we pass in unicode
+ # so that it will successfully remove temp trees containing
+ # non-ASCII filenames on Windows. (We're assuming the temp dir
+ # name itself does not contain non-ASCII characters.)
+ shutil.rmtree(unicode(TEMP_DIR))
# Restore the old settings.
for key, value in state.items():
setattr(settings, key, value)
Please sign in to comment.
Something went wrong with that request. Please try again.