diff -r 01676a4c16ff Lib/pathlib.py --- a/Lib/pathlib.py Sun Dec 08 10:06:04 2013 +0100 +++ b/Lib/pathlib.py Sun Dec 08 12:24:02 2013 +0200 @@ -1096,7 +1096,7 @@ except OSError as e: if e.errno != ENOENT: raise - self.parent.mkdir(mode, True) + self.parent.mkdir(parents=True) self._accessor.mkdir(self, mode) def chmod(self, mode): diff -r 01676a4c16ff Lib/test/test_pathlib.py --- a/Lib/test/test_pathlib.py Sun Dec 08 10:06:04 2013 +0100 +++ b/Lib/test/test_pathlib.py Sun Dec 08 12:24:02 2013 +0200 @@ -1493,7 +1493,15 @@ with self.assertRaises(OSError) as cm: p.mkdir(parents=True) self.assertEqual(cm.exception.errno, errno.EEXIST) - # XXX test `mode` arg + # test `mode` arg + mode = stat.S_IMODE(p.stat().st_mode) # default mode + p = self.cls(BASE, 'newdirD', 'newdirE') + p.mkdir(0o555, parents=True) + self.assertTrue(p.exists()) + self.assertTrue(p.is_dir()) + if os.name != 'nt': + self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o555 & mode) + self.assertEqual(stat.S_IMODE(p.parent.stat().st_mode), mode) @with_symlinks def test_symlink_to(self):