changeset 33751:3889cf955a62 stable

hg: tolerate long vs. int in test-context.py The file times here can be longs instead of ints on some platforms, which will cause a test failure due to these printing with an L suffix; instead always format with %d which will produce the same output in either case. Differential Revision: https://phab.mercurial-scm.org/D361
author Tristan Seligmann <mithrandi@mithrandi.net>
date Sat, 12 Aug 2017 14:24:25 +0200
parents 7686cbb0ba41
children 82c39a8ec3b1
files tests/test-context.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-context.py	Fri Aug 11 10:16:00 2017 +0900
+++ b/tests/test-context.py	Sat Aug 12 14:24:25 2017 +0200
@@ -24,11 +24,10 @@
 repo[None].add(['foo'])
 repo.commit(text='commit1', date="0 0")
 
+d = repo[None]['foo'].date()
 if os.name == 'nt':
-    d = repo[None]['foo'].date()
-    print("workingfilectx.date = (%d, %d)" % (d[0], d[1]))
-else:
-    print("workingfilectx.date =", repo[None]['foo'].date())
+    d = d[:2]
+print("workingfilectx.date = (%d, %d)" % d)
 
 # test memctx with non-ASCII commit message