[pypy-commit] pypy default: fix stat_result's repr on windows
pjenvey
noreply at buildbot.pypy.org
Wed Apr 24 00:03:31 CEST 2013
Author: Philip Jenvey <pjenvey at underboss.org>
Branch:
Changeset: r63570:4c31c5cb4b44
Date: 2013-04-23 14:58 -0700
http://bitbucket.org/pypy/pypy/changeset/4c31c5cb4b44/
Log: fix stat_result's repr on windows
diff --git a/pypy/module/posix/app_posix.py b/pypy/module/posix/app_posix.py
--- a/pypy/module/posix/app_posix.py
+++ b/pypy/module/posix/app_posix.py
@@ -20,7 +20,7 @@
class stat_result:
__metaclass__ = structseqtype
- name = "posix.stat_result"
+ name = osname + ".stat_result"
st_mode = structseqfield(0, "protection bits")
st_ino = structseqfield(1, "inode")
diff --git a/pypy/module/posix/test/test_posix2.py b/pypy/module/posix/test/test_posix2.py
--- a/pypy/module/posix/test/test_posix2.py
+++ b/pypy/module/posix/test/test_posix2.py
@@ -159,6 +159,7 @@
assert st.st_atime == 41
assert st.st_mtime == 42.1
assert st.st_ctime == 43
+ assert repr(st).startswith(self.posix.__name__ + '.stat_result')
def test_stat_lstat(self):
import stat
More information about the pypy-commit
mailing list