1 |
commit: c040200175b33e637a4807278925e92cf61eb725 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 9 20:28:27 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 9 20:41:58 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c0402001 |
7 |
|
8 |
testDoInsOption: fix timestamp comparison to work in travis |
9 |
|
10 |
Use integer comparison in order to avoid failures like the |
11 |
following: |
12 |
|
13 |
AssertionError: 1515530127.479328 != 1515530127.479327 |
14 |
|
15 |
pym/portage/tests/bin/test_doins.py | 5 +++-- |
16 |
1 file changed, 3 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/pym/portage/tests/bin/test_doins.py b/pym/portage/tests/bin/test_doins.py |
19 |
index 9b6c55d85..e3d5153b3 100644 |
20 |
--- a/pym/portage/tests/bin/test_doins.py |
21 |
+++ b/pym/portage/tests/bin/test_doins.py |
22 |
@@ -45,8 +45,9 @@ class DoIns(setup_env.BinTestCase): |
23 |
st = os.lstat(env['D'] + '/test') |
24 |
if stat.S_IMODE(st.st_mode) != 0o644: |
25 |
raise tests.TestCase.failureException |
26 |
- if os.stat(os.path.join(env['S'], 'test')).st_mtime != st.st_mtime: |
27 |
- raise tests.TestCase.failureException |
28 |
+ self.assertEqual( |
29 |
+ os.stat(os.path.join(env['S'], 'test'))[stat.ST_MTIME], |
30 |
+ st[stat.ST_MTIME]) |
31 |
finally: |
32 |
self.cleanup() |