mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Truncate st_?time before comparing it with ST_?TIME in the tests.
This commit is contained in:
parent
1083c248df
commit
4d394dfebb
3 changed files with 9 additions and 1 deletions
|
@ -111,7 +111,11 @@ class StatAttributeTests(unittest.TestCase):
|
|||
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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue