summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2013-01-17 14:34:50 (GMT)
committerStefan Krah <skrah@bytereef.org>2013-01-17 14:34:50 (GMT)
commita8e59feeb5643b9643f8bd86e418c09f4b93c475 (patch)
tree996764b7dac8bcc07a6f5279a0ad76b60595b54e /Lib/test/test_os.py
parent9f1b6018a93ceada4cd9767e2b5f6a2ce8b701de (diff)
parentebee49a48739fed72e9a4607a8fb975146a029d3 (diff)
downloadcpython-a8e59feeb5643b9643f8bd86e418c09f4b93c475.zip
cpython-a8e59feeb5643b9643f8bd86e418c09f4b93c475.tar.gz
cpython-a8e59feeb5643b9643f8bd86e418c09f4b93c475.tar.bz2
Merge 3.3.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index ff39c78..32a67e5 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -49,6 +49,9 @@ if hasattr(sys, 'thread_info') and sys.thread_info.version:
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 sys.platform != 'win32':
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 sys.platform != 'win32':
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 sys.platform != 'win32':
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)