summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2010-03-01 05:43:43 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2010-03-01 05:43:43 (GMT)
commit6a65f85e79db20f16a7f18873322984f5b1333ee (patch)
treed53e74421ac7c76f66770054dea7834b25ae7339 /Lib/test
parent3c699d334a1f6f413326bd8a3cbcd1a7a4b4a93d (diff)
downloadcpython-6a65f85e79db20f16a7f18873322984f5b1333ee.zip
cpython-6a65f85e79db20f16a7f18873322984f5b1333ee.tar.gz
cpython-6a65f85e79db20f16a7f18873322984f5b1333ee.tar.bz2
Fixes issue #7999: os.setreuid() and os.setregid() would refuse to accept
a -1 parameter on some platforms such as OS X.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_os.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index f8bb16b..44cc4cb 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -642,6 +642,7 @@ if sys.platform != 'win32':
self.assertRaises(os.error, os.setreuid, 0, 0)
self.assertRaises(OverflowError, os.setreuid, 1<<32, 0)
self.assertRaises(OverflowError, os.setreuid, 0, 1<<32)
+ os.setreuid(-1, -1) # Does nothing, but it needs to accept -1
if hasattr(os, 'setregid'):
def test_setregid(self):
@@ -649,6 +650,7 @@ if sys.platform != 'win32':
self.assertRaises(os.error, os.setregid, 0, 0)
self.assertRaises(OverflowError, os.setregid, 1<<32, 0)
self.assertRaises(OverflowError, os.setregid, 0, 1<<32)
+ os.setregid(-1, -1) # Does nothing, but it needs to accept -1
else:
class PosixUidGidTests(unittest.TestCase):
pass