# HG changeset patch # User Matt Harbison # Date 2019-10-13 04:15:36 # Node ID 86b26f20146d9394582b172ffcb5fcb92739d1e7 # Parent 138ac8cbce6028da7795427d37652ea43c080e13 tests: open file in binary mode in test-upgrade-repo.t Otherwise the file sizes printed in the output diverge from other platforms. Differential Revision: https://phab.mercurial-scm.org/D7081 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 @@ Upgrading a repository to generaldelta w >>> 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