Issue #25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True)

This commit is contained in:
Martin Panter 2015-11-19 04:48:44 +00:00
parent 41f69f4cc7
commit a82642f9db
3 changed files with 11 additions and 3 deletions

View file

@ -971,6 +971,9 @@ class MakedirTests(unittest.TestCase):
os.makedirs(path, mode=mode, exist_ok=True)
os.umask(old_mask)
# Issue #25583: A drive root could raise PermissionError on Windows
os.makedirs(os.path.abspath('/'), exist_ok=True)
@unittest.skipUnless(hasattr(os, 'chown'), 'test needs os.chown')
def test_chown_uid_gid_arguments_must_be_index(self):
stat = os.stat(support.TESTFN)