# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1518348830 -19800 # Node ID bfc9ab6c1becfadd5c9a3a447af4915d78ec03b9 # Parent 2ea0e89bca1e3af4f0e5663fccaf9407c5888f99 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 diff -r 2ea0e89bca1e -r bfc9ab6c1bec tests/test-patch-offset.t --- 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'