it is False, future calls return ints. If newval is omitted, return
the current setting.
+For compatibility with older Python versions, accessing
+\class{stat_result} as a tuple always returns integers.
+
\versionchanged[Python now returns float values by default. Applications
which do not work correctly with floating point time stamps can use
this function to restore the old behaviour]{2.5}
for name in dir(stat):
if name[:3] == 'ST_':
attr = name.lower()
- self.assertEquals(getattr(result, attr),
+ if name.endswith("TIME"):
+ def trunc(x): return int(x)
+ else:
+ def trunc(x): return x
+ self.assertEquals(trunc(getattr(result, attr)),
result[getattr(stat, name)])
self.assert_(attr in members)
Tests
-----
+- In test_os, st_?time is now truncated before comparing it with ST_?TIME.
Mac
---