diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2011-12-25 18:53:29 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2011-12-25 18:53:29 +0000 |
| commit | 5df784ab4293fb6740d062fe868be7bcafed348a (patch) | |
| tree | abbc3e4d75c40cec5b1ec978d3b14aa4e9e65c62 | |
| parent | db2b1458b1fc83c8485687634934b7c4909cde78 (diff) | |
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
| -rwxr-xr-x | tests/runtests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index 73c35a50c1..ed032a57d0 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -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) |
