a96f75
diff -up Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows Python-2.7.3/Lib/test/test_os.py
a96f75
--- Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows	2012-04-09 19:07:32.000000000 -0400
7e9894
+++ Python-2.7.3/Lib/test/test_os.py	2012-06-26 14:51:36.000817929 -0400
a96f75
@@ -677,30 +677,36 @@ if sys.platform != 'win32':
Matej Stuchlik ebcba8
     def test_setuid(self):
Matej Stuchlik ebcba8
         if os.getuid() != 0:
Matej Stuchlik ebcba8
             self.assertRaises(os.error, os.setuid, 0)
Matej Stuchlik ebcba8
+        self.assertRaises(TypeError, os.setuid, 'not an int')
Matej Stuchlik ebcba8
         self.assertRaises(OverflowError, os.setuid, 1<<32)
a96f75
 
Matej Stuchlik ebcba8
     @unittest.skipUnless(hasattr(os, 'setgid'), 'test needs os.setgid()')
Matej Stuchlik ebcba8
     def test_setgid(self):
Matej Stuchlik ebcba8
         if os.getuid() != 0:
Matej Stuchlik ebcba8
             self.assertRaises(os.error, os.setgid, 0)
Matej Stuchlik ebcba8
+        self.assertRaises(TypeError, os.setgid, 'not an int')
Matej Stuchlik ebcba8
         self.assertRaises(OverflowError, os.setgid, 1<<32)
a96f75
 
Matej Stuchlik ebcba8
     @unittest.skipUnless(hasattr(os, 'seteuid'), 'test needs os.seteuid()')
Matej Stuchlik ebcba8
     def test_seteuid(self):
Matej Stuchlik ebcba8
         if os.getuid() != 0:
Matej Stuchlik ebcba8
             self.assertRaises(os.error, os.seteuid, 0)
Matej Stuchlik ebcba8
+        self.assertRaises(TypeError, os.seteuid, 'not an int')
Matej Stuchlik ebcba8
         self.assertRaises(OverflowError, os.seteuid, 1<<32)
a96f75
 
Matej Stuchlik ebcba8
     @unittest.skipUnless(hasattr(os, 'setegid'), 'test needs os.setegid()')
Matej Stuchlik ebcba8
     def test_setegid(self):
Matej Stuchlik ebcba8
         if os.getuid() != 0:
Matej Stuchlik ebcba8
             self.assertRaises(os.error, os.setegid, 0)
Matej Stuchlik ebcba8
+        self.assertRaises(TypeError, os.setegid, 'not an int')
Matej Stuchlik ebcba8
         self.assertRaises(OverflowError, os.setegid, 1<<32)
a96f75
 
Matej Stuchlik ebcba8
     @unittest.skipUnless(hasattr(os, 'setreuid'), 'test needs os.setreuid()')
Matej Stuchlik ebcba8
     def test_setreuid(self):
Matej Stuchlik ebcba8
         if os.getuid() != 0:
Matej Stuchlik ebcba8
             self.assertRaises(os.error, os.setreuid, 0, 0)
Matej Stuchlik ebcba8
+        self.assertRaises(TypeError, os.setreuid, 'not an int', 0)
Matej Stuchlik ebcba8
+        self.assertRaises(TypeError, os.setreuid, 0, 'not an int')
Matej Stuchlik ebcba8
         self.assertRaises(OverflowError, os.setreuid, 1<<32, 0)
Matej Stuchlik ebcba8
         self.assertRaises(OverflowError, os.setreuid, 0, 1<<32)
a96f75
 
a96f75
@@ -715,6 +721,8 @@ if sys.platform != 'win32':
Matej Stuchlik ebcba8
     def test_setregid(self):
Matej Stuchlik ebcba8
         if os.getuid() != 0:
Matej Stuchlik ebcba8
             self.assertRaises(os.error, os.setregid, 0, 0)
Matej Stuchlik ebcba8
+        self.assertRaises(TypeError, os.setregid, 'not an int', 0)
Matej Stuchlik ebcba8
+        self.assertRaises(TypeError, os.setregid, 0, 'not an int')
Matej Stuchlik ebcba8
         self.assertRaises(OverflowError, os.setregid, 1<<32, 0)
Matej Stuchlik ebcba8
         self.assertRaises(OverflowError, os.setregid, 0, 1<<32)
a96f75