From: Martin Panter Date: Fri, 20 Nov 2015 02:35:46 +0000 (+0000) Subject: Issue #25583: Merge makedirs fix from 3.4 into 3.5 X-Git-Tag: v3.5.1rc1~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97cabb9fa5bd257aceae724f4727fe54580c4e9f;p=python Issue #25583: Merge makedirs fix from 3.4 into 3.5 --- 97cabb9fa5bd257aceae724f4727fe54580c4e9f diff --cc Lib/test/test_os.py index 1e67e7ab19,e29b0d585c..618c18abed --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@@ -1040,6 -971,20 +1040,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) - uid = stat.st_uid - gid = stat.st_gid - for value in (-1.0, -1j, decimal.Decimal(-1), fractions.Fraction(-2, 2)): - self.assertRaises(TypeError, os.chown, support.TESTFN, value, gid) - self.assertRaises(TypeError, os.chown, support.TESTFN, uid, value) - self.assertIsNone(os.chown(support.TESTFN, uid, gid)) - self.assertIsNone(os.chown(support.TESTFN, -1, -1)) - def test_exist_ok_s_isgid_directory(self): path = os.path.join(support.TESTFN, 'dir1') S_ISGID = stat.S_ISGID