tests: test-archive.t use print_function
authortimeless <timeless@mozdev.org>
Fri, 06 May 2016 19:15:37 +0000
changeset 29177 df6b5c6d252a
parent 29176 8c8442523eef
child 29178 0fb2fddd00a3
tests: test-archive.t use print_function
tests/test-archive.t
--- a/tests/test-archive.t	Tue May 17 11:28:46 2016 -0500
+++ b/tests/test-archive.t	Fri May 06 19:15:37 2016 +0000
@@ -195,6 +195,7 @@
   > done
 
   $ cat > md5comp.py <<EOF
+  > from __future__ import print_function
   > try:
   >     from hashlib import md5
   > except ImportError:
@@ -203,7 +204,7 @@
   > f1, f2 = sys.argv[1:3]
   > h1 = md5(file(f1, 'rb').read()).hexdigest()
   > h2 = md5(file(f2, 'rb').read()).hexdigest()
-  > print h1 == h2 or "md5 differ: " + repr((h1, h2))
+  > print(h1 == h2 or "md5 differ: " + repr((h1, h2)))
   > EOF
 
 archive name is stored in the archive, so create similar archives and
@@ -343,8 +344,9 @@
   $ hg -R repo add repo/a
   $ hg -R repo commit -m '#0' -d '456789012 21600'
   $ cat > show_mtime.py <<EOF
+  > from __future__ import print_function
   > import sys, os
-  > print int(os.stat(sys.argv[1]).st_mtime)
+  > print(int(os.stat(sys.argv[1]).st_mtime))
   > EOF
 
   $ hg -R repo archive --prefix tar-extracted archive.tar