[issue9581] PosixGroupsTester fails as root

Antoine Pitrou report at bugs.python.org
Thu Aug 12 22:47:22 CEST 2010


New submission from Antoine Pitrou <pitrou at free.fr>:

I get the following test_posix failures when run as root (Mandriva Linux):

======================================================================
ERROR: test_initgroups (test.test_posix.PosixGroupsTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/test_posix.py", line 418, in test_initgroups
    g = g2 + 1
UnboundLocalError: local variable 'g2' referenced before assignment

======================================================================
FAIL: test_setgroups (test.test_posix.PosixGroupsTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/test_posix.py", line 428, in test_setgroups
    self.assertListEqual(groups, posix.getgroups())
AssertionError: First sequence is not a list: range(0, 16)


Under 2.6, there's another failure:

======================================================================
ERROR: test_setgroups (test.test_posix.PosixGroupsTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antoine/cpython/26/Lib/test/test_posix.py", line 356, in test_setgroups
    self.assertListEqual(groups, posix.getgroups())
AttributeError: 'PosixGroupsTester' object has no attribute 'assertListEqual'

----------
assignee: ronaldoussoren
components: Tests
messages: 113705
nosy: exarkun, pitrou, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: PosixGroupsTester fails as root
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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


More information about the Python-bugs-list mailing list