[Python-Dev] test_pwd failing

Walter Dörwald walter@livinglogic.de
Tue, 15 Apr 2003 17:31:05 +0200


Guido van Rossum wrote:

> Somebody just changed the pwd module.  I now get these errors when
> running test_pwd:
> 
> [guido@odiug linux]$ ./python ../Lib/test/regrtest.py test_pwd
> test_pwd
> test test_pwd failed -- Traceback (most recent call last):
>   File "/mnt/home/guido/projects/python/dist/src/Lib/test/test_pwd.py", line 29, in test_values
>     self.assertEqual(pwd.getpwuid(e.pw_uid), e)
>   File "/mnt/home/guido/projects/python/dist/src/Lib/unittest.py", line 292, in failUnlessEqual
>     raise self.failureException, \
> AssertionError: ('guido', 'x', 4102, 4102, 'Guido van Rossum', '/home/guido', '/bin/bash') != ('guido1', 'x', 4102, 4102, 'Guido van Rossum', '/home/guido1', '/bin/bash')
> 
> 1 test failed:
>     test_pwd
> [guido@odiug linux]$ 
> 
> The last two lines of my /etc/passwd file are:
> 
> guido:x:4102:4102:Guido van Rossum:/home/guido:/bin/bash
> guido1:x:4102:4102:Guido van Rossum:/home/guido1:/bin/bash

That's my fault.

The duplicate entry for the uid 4102 makes the test fail.

I'll think of an alternate test for this case.

Bye,
    Walter Dörwald