py3: make sure we write bytes in a file open in bytes mode
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 01 Mar 2018 23:59:20 +0530
changeset 36495 eafd380fe1b8
parent 36494 f1e05fe1a78f
child 36496 7af7443877da
py3: make sure we write bytes in a file open in bytes mode # skip-blame just b'' prefix Differential Revision: https://phab.mercurial-scm.org/D2519
tests/test-grep.t
--- a/tests/test-grep.t	Thu Mar 01 23:58:21 2018 +0530
+++ b/tests/test-grep.t	Thu Mar 01 23:59:20 2018 +0530
@@ -271,7 +271,7 @@
 
 match in last "line" without newline
 
-  $ $PYTHON -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();'
+  $ $PYTHON -c 'fp = open("noeol", "wb"); fp.write(b"no infinite loop"); fp.close();'
   $ hg ci -Amnoeol
   adding noeol
   $ hg grep loop