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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Feb 11 09:05:25 EST 2018


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

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



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


More information about the Mercurial-devel mailing list