Patchwork D7081: tests: open file in binary mode in test-upgrade-repo.t

login
register
mail settings
Submitter phabricator
Date Oct. 13, 2019, 6:11 a.m.
Message ID <93890b481d61736e087d7390166bb850@localhost.localdomain>
Download mbox | patch
Permalink /patch/42286/
State Not Applicable
Headers show

Comments

phabricator - Oct. 13, 2019, 6:11 a.m.
Closed by commit rHG86b26f20146d: tests: open file in binary mode in test-upgrade-repo.t (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7081?vs=17123&id=17126

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7081/new/

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

AFFECTED FILES
  tests/test-upgrade-repo.t

CHANGE DETAILS




To: mharbison72, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel

Patch

diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
--- a/tests/test-upgrade-repo.t
+++ b/tests/test-upgrade-repo.t
@@ -452,9 +452,9 @@ 
   >>> from __future__ import absolute_import, print_function
   >>> import random
   >>> random.seed(0) # have a reproducible content
-  >>> with open("f2", "w") as f:
+  >>> with open("f2", "wb") as f:
   ...     for i in range(100000):
-  ...         f.write("%d\n" % random.randint(1000000000, 9999999999)) and None
+  ...         f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None
   $ hg -q commit -A -m 'add f2'
 
 make sure we have a .d file