branch | oldstable |
changeset 7693 | e2f75311d7be |
parent 5424 | 8ecbcbff9777 |
child 10214 | 88f60d4b9952 |
--- a/skeleton/test/pytestconf.py Wed Jul 20 18:21:47 2011 +0200 +++ b/skeleton/test/pytestconf.py Tue Jul 26 16:05:36 2011 +0200 @@ -19,7 +19,7 @@ """ import os -import pwd +import sys from logilab.common.pytest import PyTester @@ -28,6 +28,9 @@ (man 3 getlogin) Another solution would be to use $LOGNAME, $USER or $USERNAME """ + if sys.platform == 'win32': + return os.environ.get('USERNAME') or 'cubicweb' + import pwd return pwd.getpwuid(os.getuid())[0]