Mercurial > hg
changeset 36027:d667302b6ee1
py3: replace file() with open() in test-import-bypass.t
file() is not present in Python 3.
This patch also adds a b'' prefix to make sure we write bytes in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2126
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 11 Feb 2018 17:11:45 +0530 |
parents | a4d7e51709e5 |
children | f6a8a81f4f7b |
files | tests/test-import-bypass.t |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-import-bypass.t Sun Feb 11 17:53:47 2018 +0530 +++ b/tests/test-import-bypass.t Sun Feb 11 17:11:45 2018 +0530 @@ -227,7 +227,7 @@ (this also tests that editor is not invoked for '--bypass', if the commit message is explicitly specified, regardless of '--edit') - $ $PYTHON -c 'file("a", "wb").write("a\r\n")' + $ $PYTHON -c 'open("a", "wb").write(b"a\r\n")' $ hg ci -m makeacrlf $ HGEDITOR=cat hg import -m 'should fail because of eol' --edit --bypass ../test.diff applying ../test.diff