Patchwork D2115: py3: replace file() with open() in test-transplant.t

login
register
mail settings
Submitter phabricator
Date Feb. 11, 2018, 2:04 p.m.
Message ID <acc54827d37d36456c02cc22d8fd30e1@localhost.localdomain>
Download mbox | patch
Permalink /patch/27556/
State Not Applicable
Headers show

Comments

phabricator - Feb. 11, 2018, 2:04 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGca62987f3f7d: py3: replace file() with open() in test-transplant.t (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2115?vs=5378&id=5404

REVISION DETAIL
  https://phab.mercurial-scm.org/D2115

AFFECTED FILES
  tests/test-transplant.t

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-transplant.t b/tests/test-transplant.t
--- a/tests/test-transplant.t
+++ b/tests/test-transplant.t
@@ -760,7 +760,7 @@ 
   $ cd twin2
   $ echo '[patch]' >> .hg/hgrc
   $ echo 'eol = crlf' >> .hg/hgrc
-  $ $PYTHON -c "file('b', 'wb').write('b\r\nb\r\n')"
+  $ $PYTHON -c "open('b', 'wb').write(b'b\r\nb\r\n')"
   $ hg ci -Am addb
   adding b
   $ hg transplant -s ../twin1 tip
@@ -838,9 +838,9 @@ 
   $ cd binarysource
   $ echo a > a
   $ hg ci -Am adda a
-  >>> file('b', 'wb').write('\0b1')
+  >>> open('b', 'wb').write(b'\0b1')
   $ hg ci -Am addb b
-  >>> file('b', 'wb').write('\0b2')
+  >>> open('b', 'wb').write(b'\0b2')
   $ hg ci -m changeb b
   $ cd ..