Author: Armin Rigo <ar...@tunes.org> Branch: py3k Changeset: r87268:703718ff9b54 Date: 2016-09-21 14:33 +0200 http://bitbucket.org/pypy/pypy/changeset/703718ff9b54/
Log: Add tests for st.st_Xtime_ns 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 @@ -137,14 +137,17 @@ assert st.st_size == 14 assert st.st_nlink == 1 - assert not hasattr(st, 'nsec_atime') - if sys.platform.startswith('linux'): assert isinstance(st.st_atime, float) assert isinstance(st.st_mtime, float) assert isinstance(st.st_ctime, float) assert hasattr(st, 'st_rdev') + assert isinstance(st.st_atime_ns, int) + assert abs(st.st_atime_ns - 1e9*st.st_atime) < 500 + assert abs(st.st_mtime_ns - 1e9*st.st_mtime) < 500 + assert abs(st.st_ctime_ns - 1e9*st.st_ctime) < 500 + def test_stat_float_times(self): path = self.path posix = self.posix _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit