summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/test/support.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py
index 4ea6c055a7..08105df426 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -186,7 +186,7 @@ def unlink(filename):
os.unlink(filename)
except OSError as error:
# The filename need not exist.
- if error.errno != errno.ENOENT:
+ if error.errno not in (errno.ENOENT, errno.ENOTDIR):
raise
def rmtree(path):
@@ -376,6 +376,7 @@ else:
# module name.
TESTFN = "{}_{}_tmp".format(TESTFN, os.getpid())
+
# Assuming sys.getfilesystemencoding()!=sys.getdefaultencoding()
# TESTFN_UNICODE is a filename that can be encoded using the
# file system encoding, but *not* with the default (ascii) encoding