[pypy-commit] pypy default: OS/X fix.

arigo noreply at buildbot.pypy.org
Wed Sep 7 12:58:58 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r47129:e556f833d5d4
Date: 2011-09-07 12:58 +0200
http://bitbucket.org/pypy/pypy/changeset/e556f833d5d4/

Log:	OS/X fix.

diff --git a/pypy/module/pwd/test/test_pwd.py b/pypy/module/pwd/test/test_pwd.py
--- a/pypy/module/pwd/test/test_pwd.py
+++ b/pypy/module/pwd/test/test_pwd.py
@@ -5,14 +5,17 @@
         cls.space = gettestobjspace(usemodules=['pwd'])
 
     def test_getpwuid(self):
-        import pwd
+        import pwd, sys
         raises(KeyError, pwd.getpwuid, -1)
         pw = pwd.getpwuid(0)
         assert pw.pw_name == 'root'
         assert isinstance(pw.pw_passwd, str)
         assert pw.pw_uid == 0
         assert pw.pw_gid == 0
-        assert pw.pw_dir == '/root'
+        if sys.platform.startswith('linux'):
+            assert pw.pw_dir == '/root'
+        else:
+            assert pw.pw_dir.startswith('/')
         assert pw.pw_shell.startswith('/')
         #
         assert type(pw.pw_uid) is int


More information about the pypy-commit mailing list