[New-bugs-announce] [issue17531] test_grp and test_pwd fail with 32-bit builds on OS X systems

Ned Deily report at bugs.python.org
Sat Mar 23 21:00:15 CET 2013


New submission from Ned Deily:

With the changes introduced for Issue4591, test_grp and test_pwd now fail on OS X systems when Python is run in 32-bit mode.

Previously, using a 64-bit/32-bit universal build of 2.7.3:

$ arch -i386 /usr/local/bin/python2.7 -c 'import grp; g=grp.getgrnam("nobody").gr_gid; print(g,type(g))'
(-2, <type 'int'>)
$ arch -x86_64 /usr/local/bin/python2.7 -c 'import grp; g=grp.getgrnam("nobody").gr_gid; print(g,type(g))'
(4294967294, <type 'int'>)

Now, with 2.7.4rc1:

$ arch -i386 /usr/local/bin/python2.7 -c 'import grp; g=grp.getgrnam("nobody").gr_gid; print(g,type(g))'
(4294967294L, <type 'long'>)
$ arch -x86_64 /usr/local/bin/python2.7 -c 'import grp; g=grp.getgrnam("nobody").gr_gid; print(g,type(g))'
(4294967294, <type 'int'>)

This results in test failures in both test_grp and test_pwd:

======================================================================
FAIL: test_values (test.test_grp.GroupDatabaseTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_grp.py", line 27, in test_values
    self.check_value(e)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_grp.py", line 19, in check_value
    self.assertIsInstance(value.gr_gid, int)
AssertionError: 4294967294L is not an instance of <type 'int'>

----------------------------------------------------------------------

======================================================================
FAIL: test_values (test.test_pwd.PwdTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_pwd.py", line 23, in test_values
    self.assertIsInstance(e.pw_gid, int)
AssertionError: 4294967294L is not an instance of <type 'int'>

----------------------------------------------------------------------

----------
components: Tests
messages: 185081
nosy: benjamin.peterson, ned.deily, serhiy.storchaka
priority: normal
severity: normal
status: open
title: test_grp and test_pwd fail with 32-bit builds on OS X systems
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17531>
_______________________________________


More information about the New-bugs-announce mailing list