# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-02-11 11:33:50 # 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 --git a/tests/test-patch-offset.t b/tests/test-patch-offset.t --- a/tests/test-patch-offset.t +++ b/tests/test-patch-offset.t @@ -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'