Patchwork D2114: py3: replace file() with open() in test-walk.t

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

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2114?vs=5377&id=5403

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

AFFECTED FILES
  tests/test-walk.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-walk.t b/tests/test-walk.t
--- a/tests/test-walk.t
+++ b/tests/test-walk.t
@@ -494,12 +494,12 @@ 
 
 Test listfile and listfile0
 
-  $ $PYTHON -c "file('listfile0', 'wb').write('fenugreek\0new\0')"
+  $ $PYTHON -c "open('listfile0', 'wb').write(b'fenugreek\0new\0')"
   $ hg debugwalk -I 'listfile0:listfile0'
   matcher: <includematcher includes='(?:fenugreek(?:/|$)|new(?:/|$))'>
   f  fenugreek  fenugreek
   f  new        new
-  $ $PYTHON -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')"
+  $ $PYTHON -c "open('listfile', 'wb').write(b'fenugreek\nnew\r\nmammals/skunk\n')"
   $ hg debugwalk -I 'listfile:listfile'
   matcher: <includematcher includes='(?:fenugreek(?:/|$)|new(?:/|$)|mammals\\/skunk(?:/|$))'>
   f  fenugreek      fenugreek