diff options
author | mattip <matti.picus@gmail.com> | 2014-06-12 00:00:13 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2014-06-12 00:00:13 +0300 |
commit | 77fe2d4e09b9ae3f3dbbecb80e8591d5702491a3 (patch) | |
tree | 68e9555c674e5a199d5f9fd05a7809e08df0b636 | |
parent | MSVC requires explicit export (diff) | |
download | pypy-77fe2d4e09b9ae3f3dbbecb80e8591d5702491a3.tar.gz pypy-77fe2d4e09b9ae3f3dbbecb80e8591d5702491a3.tar.bz2 pypy-77fe2d4e09b9ae3f3dbbecb80e8591d5702491a3.zip |
pypy gets os.stat().st_mtime from win32api, cpython from crt
-rw-r--r-- | rpython/rtyper/module/test/test_ll_os_stat.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rpython/rtyper/module/test/test_ll_os_stat.py b/rpython/rtyper/module/test/test_ll_os_stat.py index af202198a5..e63d46fe15 100644 --- a/rpython/rtyper/module/test/test_ll_os_stat.py +++ b/rpython/rtyper/module/test/test_ll_os_stat.py @@ -22,13 +22,14 @@ class TestWin32Implementation: 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()) |