Fix error handling removing files in test.support.unlink
diff --git a/Lib/test/support.py b/Lib/test/support.py
index 4ea6c05..08105df 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -186,7 +186,7 @@
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 @@
# 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