summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-04-01 23:17:57 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-04-01 23:17:57 (GMT)
commit4717e2112b80eae8466bf06e2523042537d54000 (patch)
tree019e9501ac93f421dfc01e4811399350cffdd4bb /Lib/test/test_os.py
parentb25e3f9e6a1a8ea292335a23eb7dea9d8174efa1 (diff)
parentee5f1c13d1ea21c628068fdf142823177f5526c2 (diff)
downloadcpython-4717e2112b80eae8466bf06e2523042537d54000.zip
cpython-4717e2112b80eae8466bf06e2523042537d54000.tar.gz
cpython-4717e2112b80eae8466bf06e2523042537d54000.tar.bz2
merge 3.2 (#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 d70a0ae..56309bf 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -872,7 +872,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)
@@ -898,9 +898,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)