summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2010-03-01 05:56:53 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2010-03-01 05:56:53 (GMT)
commit18ac2b4a7178983ca97b4d29c68ed3aa1cb22a58 (patch)
tree36034266ef54d78e638a5f807f514a3439d69886 /Lib/test/test_os.py
parent807e98e0afde0441349d9e627391a88e9f6fb9db (diff)
downloadcpython-18ac2b4a7178983ca97b4d29c68ed3aa1cb22a58.zip
cpython-18ac2b4a7178983ca97b4d29c68ed3aa1cb22a58.tar.gz
cpython-18ac2b4a7178983ca97b4d29c68ed3aa1cb22a58.tar.bz2
Merged revisions 78548 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78548 | gregory.p.smith | 2010-02-28 21:54:14 -0800 (Sun, 28 Feb 2010) | 10 lines Merged revisions 78546 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78546 | gregory.p.smith | 2010-02-28 21:43:43 -0800 (Sun, 28 Feb 2010) | 3 lines 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/test_os.py')
-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 d7f763f..2d95f62 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -717,6 +717,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):
@@ -724,6 +725,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
@unittest.skipIf(sys.platform == 'darwin', "tests don't apply to OS X")
class Pep383Tests(unittest.TestCase):