Patchwork D6918: tests: suppress output from write()

login
register
mail settings
Submitter phabricator
Date Sept. 29, 2019, 7:19 p.m.
Message ID <differential-rev-PHID-DREV-e2pz57itvyc5codvsb5w-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/41842/
State Superseded
Headers show

Comments

phabricator - Sept. 29, 2019, 7:19 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Otherwise it is printed and the test fails with tons of output on
  Python 3.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-upgrade-repo.t

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: 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
@@ -390,7 +390,7 @@ 
   >>> random.seed(0) # have a reproducible content
   >>> with open("f2", "w") as f:
   ...     for i in range(100000):
-  ...         f.write("%d\n" % random.randint(1000000000, 9999999999))
+  ...         f.write("%d\n" % random.randint(1000000000, 9999999999)) and None
   $ hg -q commit -A -m 'add f2'
 
 make sure we have a .d file