changeset 36020:bfc9ab6c1bec

py3: replace file() with open() in test-patch-offset.t file() is not present in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2119
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 11 Feb 2018 17:03:50 +0530
parents 2ea0e89bca1e
children 85c94c9d342b
files tests/test-patch-offset.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-patch-offset.t	Sun Feb 11 17:03:17 2018 +0530
+++ b/tests/test-patch-offset.t	Sun Feb 11 17:03:50 2018 +0530
@@ -5,7 +5,7 @@
   > path = sys.argv[1]
   > patterns = sys.argv[2:]
   > 
-  > fp = file(path, 'wb')
+  > fp = open(path, 'wb')
   > for pattern in patterns:
   >     count = int(pattern[0:-1])
   >     char = pattern[-1] + '\n'