Patchwork D2118: py3: replace file() with open() in test-relink.t

login
register
mail settings
Submitter phabricator
Date Feb. 11, 2018, 2:04 p.m.
Message ID <bce04781a61f318a76036c4c09f3ea1b@localhost.localdomain>
Download mbox | patch
Permalink /patch/27559/
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 rHG2ea0e89bca1e: py3: replace file() with open() in test-relink.t (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2118?vs=5381&id=5407

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

AFFECTED FILES
  tests/test-relink.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-relink.t b/tests/test-relink.t
--- a/tests/test-relink.t
+++ b/tests/test-relink.t
@@ -49,7 +49,7 @@ 
 
 Test files are read in binary mode
 
-  $ $PYTHON -c "file('.hg/store/data/dummy.i', 'wb').write('a\r\nb\n')"
+  $ $PYTHON -c "open('.hg/store/data/dummy.i', 'wb').write(b'a\r\nb\n')"
   $ cd ..
 
 
@@ -68,7 +68,7 @@ 
   $ echo b >> b
   $ hg ci -m changeb
   created new head
-  $ $PYTHON -c "file('.hg/store/data/dummy.i', 'wb').write('a\nb\r\n')"
+  $ $PYTHON -c "open('.hg/store/data/dummy.i', 'wb').write(b'a\nb\r\n')"
 
 
 relink