[PATCH 2 of 5] tests: test-archive.t use open() instead of file() for py3 compat

timeless timeless at fmr.im
Wed May 11 01:21:03 EDT 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1462562176 0
#      Fri May 06 19:16:16 2016 +0000
# Node ID 4863c4335adb884356b47339c37bec543c889a95
# Parent  5e44aad4d3f93555d9ea24bb90074b58e232eec4
# EXP-Topic runtests
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r 4863c4335adb
tests: test-archive.t use open() instead of file() for py3 compat

diff -r 5e44aad4d3f9 -r 4863c4335adb tests/test-archive.t
--- a/tests/test-archive.t	Fri May 06 19:15:37 2016 +0000
+++ b/tests/test-archive.t	Fri May 06 19:16:16 2016 +0000
@@ -202,8 +202,8 @@
   >     from md5 import md5
   > import sys
   > f1, f2 = sys.argv[1:3]
-  > h1 = md5(file(f1, 'rb').read()).hexdigest()
-  > h2 = md5(file(f2, 'rb').read()).hexdigest()
+  > h1 = md5(open(f1, 'rb').read()).hexdigest()
+  > h2 = md5(open(f2, 'rb').read()).hexdigest()
   > print(h1 == h2 or "md5 differ: " + repr((h1, h2)))
   > EOF
 


More information about the Mercurial-devel mailing list