summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-04-01 23:21:57 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-04-01 23:21:57 (GMT)
commit18395290c380c8051ec5577f8886c1159eb54cef (patch)
tree183e2fd72e88efad42aadffe9d4d0cc92c4f5899 /Lib/test/test_os.py
parent80f6759c09cf446c90313b99dd04eeb04dd7f115 (diff)
parent9dc203fff90c04baf3b9e4410ceba4a25d893b3c (diff)
downloadcpython-18395290c380c8051ec5577f8886c1159eb54cef.zip
cpython-18395290c380c8051ec5577f8886c1159eb54cef.tar.gz
cpython-18395290c380c8051ec5577f8886c1159eb54cef.tar.bz2
merge 3.4 (#21082)
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 5024093..f744815 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -901,7 +901,7 @@ class MakedirTests(unittest.TestCase):
os.makedirs(path, mode)
self.assertRaises(OSError, os.makedirs, path, mode)
self.assertRaises(OSError, os.makedirs, path, mode, exist_ok=False)
- self.assertRaises(OSError, os.makedirs, path, 0o776, exist_ok=True)
+ os.makedirs(path, 0o776, exist_ok=True)
os.makedirs(path, mode=mode, exist_ok=True)
os.umask(old_mask)
@@ -938,9 +938,8 @@ class MakedirTests(unittest.TestCase):
os.makedirs(path, mode, exist_ok=True)
# remove the bit.
os.chmod(path, stat.S_IMODE(os.lstat(path).st_mode) & ~S_ISGID)
- with self.assertRaises(OSError):
- # Should fail when the bit is not already set when demanded.
- os.makedirs(path, mode | S_ISGID, exist_ok=True)
+ # May work even when the bit is not already set when demanded.
+ os.makedirs(path, mode | S_ISGID, exist_ok=True)
finally:
os.umask(old_mask)