]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
group ids and user ids can be longs now (#17531)
authorBenjamin Peterson <benjamin@python.org>
Sat, 23 Mar 2013 20:40:36 +0000 (15:40 -0500)
committerBenjamin Peterson <benjamin@python.org>
Sat, 23 Mar 2013 20:40:36 +0000 (15:40 -0500)
Lib/test/test_grp.py
Lib/test/test_pwd.py
Misc/NEWS

index e9e175826360c0ac21b6944b6507a99e0edaf150..62d2baf590a9ad52fc389c02c5f1e1269b0a76fa 100644 (file)
@@ -16,7 +16,7 @@ class GroupDatabaseTestCase(unittest.TestCase):
         self.assertEqual(value[1], value.gr_passwd)
         self.assertIsInstance(value.gr_passwd, basestring)
         self.assertEqual(value[2], value.gr_gid)
-        self.assertIsInstance(value.gr_gid, int)
+        self.assertIsInstance(value.gr_gid, (long, int))
         self.assertEqual(value[3], value.gr_mem)
         self.assertIsInstance(value.gr_mem, list)
 
index ce8b8b347ce74fce9bd5c2d26b31b58e862bac12..696161a34908a27f419815f4849c6561245a606c 100644 (file)
@@ -18,9 +18,9 @@ class PwdTest(unittest.TestCase):
             self.assertEqual(e[1], e.pw_passwd)
             self.assertIsInstance(e.pw_passwd, basestring)
             self.assertEqual(e[2], e.pw_uid)
-            self.assertIsInstance(e.pw_uid, int)
+            self.assertIsInstance(e.pw_uid, (int, long))
             self.assertEqual(e[3], e.pw_gid)
-            self.assertIsInstance(e.pw_gid, int)
+            self.assertIsInstance(e.pw_gid, (int, long))
             self.assertEqual(e[4], e.pw_gecos)
             self.assertIsInstance(e.pw_gecos, basestring)
             self.assertEqual(e[5], e.pw_dir)
index cfa3f64d6b345c38561d796d26e36dfe2a7361ba..d9e023fa1f3e50da2ed56c3de8e7272e3f41282c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -9,7 +9,8 @@ What's New in Python 2.7.4?
 Library
 -------
 
-- Issue #17531: Return group and user ids as int instead long when possible.
+- Issue #17531: Fix tests that thought group and user ids were always the int
+  type.
 
 
 What's New in Python 2.7.4 release candidate 1