summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode_file.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_unicode_file.py')
-rw-r--r--Lib/test/test_unicode_file.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py
index a0de139..4bafd98 100644
--- a/Lib/test/test_unicode_file.py
+++ b/Lib/test/test_unicode_file.py
@@ -40,6 +40,10 @@ os.chmod(TESTFN_ENCODED, 0777)
os.chmod(TESTFN_UNICODE, 0777)
# Test rename
+try:
+ os.unlink(TESTFN_ENCODED + ".new")
+except os.error:
+ pass
os.rename(TESTFN_ENCODED, TESTFN_ENCODED + ".new")
os.rename(TESTFN_UNICODE+".new", TESTFN_ENCODED)