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