[Python-checkins] cpython (merge 3.3 -> default): Merge 3.3.

stefan.krah python-checkins at python.org
Thu Jan 17 15:36:03 CET 2013


http://hg.python.org/cpython/rev/59ff2d75c836
changeset: 81557:59ff2d75c836
parent: 81555:9638fc96deb7
parent: 81556:a94752d75c74
user: Stefan Krah <skrah at bytereef.org>
date: Thu Jan 17 15:34:50 2013 +0100
summary:
 Merge 3.3.
files:
 Lib/test/test_os.py | 9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -49,6 +49,9 @@
 else:
 USING_LINUXTHREADS = False
 
+# Issue #14110: Some tests fail on FreeBSD if the user is in the wheel group.
+HAVE_WHEEL_GROUP = sys.platform.startswith('freebsd') and os.getgid() == 0
+
 # Tests creating TESTFN
 class FileTests(unittest.TestCase):
 def setUp(self):
@@ -1240,7 +1243,7 @@
 
 if hasattr(os, 'setgid'):
 def test_setgid(self):
- if os.getuid() != 0:
+ if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
 self.assertRaises(OSError, os.setgid, 0)
 self.assertRaises(OverflowError, os.setgid, 1<<32)
 
@@ -1252,7 +1255,7 @@
 
 if hasattr(os, 'setegid'):
 def test_setegid(self):
- if os.getuid() != 0:
+ if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
 self.assertRaises(OSError, os.setegid, 0)
 self.assertRaises(OverflowError, os.setegid, 1<<32)
 
@@ -1272,7 +1275,7 @@
 
 if hasattr(os, 'setregid'):
 def test_setregid(self):
- if os.getuid() != 0:
+ if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
 self.assertRaises(OSError, os.setregid, 0, 0)
 self.assertRaises(OverflowError, os.setregid, 1<<32, 0)
 self.assertRaises(OverflowError, os.setregid, 0, 1<<32)
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /