diff -r 59220b704562 -r 42ca81d2e805 common/test/unittest_mail.py --- a/common/test/unittest_mail.py Fri Sep 18 11:24:37 2009 +0200 +++ b/common/test/unittest_mail.py Fri Sep 18 12:21:49 2009 +0200 @@ -8,7 +8,7 @@ """ import os -import pwd +import sys from logilab.common.testlib import unittest_main from logilab.common.umessage import message_from_string @@ -22,7 +22,11 @@ (man 3 getlogin) Another solution would be to use $LOGNAME, $USER or $USERNAME """ - return pwd.getpwuid(os.getuid())[0] + if sys.platform != 'win32': + import pwd + return pwd.getpwuid(os.getuid())[0] + else: + return os.environ.get('USERNAME') class EmailTC(EnvBasedTC):