Patchwork D2127: py3: replace file() with open() in test-fileset.t

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

Comments

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

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2127?vs=5390&id=5417

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

AFFECTED FILES
  tests/test-fileset.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-fileset.t b/tests/test-fileset.t
--- a/tests/test-fileset.t
+++ b/tests/test-fileset.t
@@ -180,7 +180,7 @@ 
 
 Test files properties
 
-  >>> file('bin', 'wb').write('\0a')
+  >>> open('bin', 'wb').write(b'\0a')
   $ fileset 'binary()'
   $ fileset 'binary() and unknown()'
   bin
@@ -219,8 +219,8 @@ 
   $ hg --config ui.portablefilenames=ignore add con.xml
 #endif
 
-  >>> file('1k', 'wb').write(' '*1024)
-  >>> file('2k', 'wb').write(' '*2048)
+  >>> open('1k', 'wb').write(b' '*1024)
+  >>> open('2k', 'wb').write(b' '*2048)
   $ hg add 1k 2k
   $ fileset 'size("bar")'
   hg: parse error: couldn't parse size: bar