[pypy-commit] pypy default: pypy gets os.stat().st_mtime from win32api, cpython from crt
mattip
noreply at buildbot.pypy.org
Wed Jun 11 23:06:19 CEST 2014
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r72030:ca96d56fe60e
Date: 2014-06-12 00:00 +0300
http://bitbucket.org/pypy/pypy/changeset/ca96d56fe60e/
Log: pypy gets os.stat().st_mtime from win32api, cpython from crt
diff --git a/rpython/rtyper/module/test/test_ll_os_stat.py b/rpython/rtyper/module/test/test_ll_os_stat.py
--- a/rpython/rtyper/module/test/test_ll_os_stat.py
+++ b/rpython/rtyper/module/test/test_ll_os_stat.py
@@ -22,13 +22,14 @@
stat = ll_os_stat.make_win32_stat_impl('stat', ll_os.StringTraits())
wstat = ll_os_stat.make_win32_stat_impl('stat', ll_os.UnicodeTraits())
def check(f):
- expected = os.stat(f).st_mtime
- assert stat(f).st_mtime == expected
- assert wstat(unicode(f)).st_mtime == expected
+ # msec resolution
+ expected = int(os.stat(f).st_mtime*1000)
+ assert int(stat(f).st_mtime*1000) == expected
+ assert int(wstat(unicode(f)).st_mtime*1000) == expected
check('c:/')
check(os.environ['TEMP'])
- check('c:/pagefile.sys')
+ check(sys.executable)
def test_fstat(self):
fstat = ll_os_stat.make_win32_stat_impl('fstat', ll_os.StringTraits())
More information about the pypy-commit
mailing list