Patchwork [4,of,5] test-context: conditionalize the workingfilectx date printing for Windows

login
register
mail settings
Submitter Matt Harbison
Date Nov. 20, 2015, 10:23 p.m.
Message ID <15e7f0404d4e9a667ab0.1448058203@waste.org>
Download mbox | patch
Permalink /patch/11550/
State Accepted
Headers show

Comments

Patch

diff --git a/tests/test-context.py b/tests/test-context.py
--- a/tests/test-context.py
+++ b/tests/test-context.py
@@ -16,7 +16,11 @@ 
 repo[None].add(['foo'])
 repo.commit(text='commit1', date="0 0")
 
-print "workingfilectx.date =", 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()
 
 # test memctx with non-ASCII commit message