diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2005-01-23 09:19:22 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2005-01-23 09:19:22 +0000 |
commit | 4d394dfebbcf00e7eec74ee5f4c1b149b3744a91 (patch) | |
tree | d64b9e915baa44448f28c7da48e38884367a48a9 /Lib | |
parent | 1083c248dfc55dde9901919e69bcb7fb29fbb7bf (diff) | |
download | cpython-git-4d394dfebbcf00e7eec74ee5f4c1b149b3744a91.tar.gz |
Truncate st_?time before comparing it with ST_?TIME in the tests.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_os.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 25fad18a2a..472d13fd09 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -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) |