From patchwork Wed Mar 14 20:02:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2867: tests: fix test-wireproto.py to work around serverrepo() not having a ui From: phabricator X-Patchwork-Id: 29514 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 14 Mar 2018 20:02:01 +0000 durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This started failing recently, but it doesn't look important as no actual ui objects have been in play. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2867 AFFECTED FILES tests/test-wireproto.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/tests/test-wireproto.py b/tests/test-wireproto.py --- a/tests/test-wireproto.py +++ b/tests/test-wireproto.py @@ -3,6 +3,7 @@ from mercurial import ( error, pycompat, + ui as uimod, util, wireproto, wireprototypes, @@ -22,12 +23,13 @@ pass class clientpeer(wireproto.wirepeer): - def __init__(self, serverrepo): + def __init__(self, serverrepo, ui): self.serverrepo = serverrepo + self._ui = ui @property def ui(self): - return self.serverrepo.ui + return self._ui def url(self): return b'test' @@ -84,7 +86,7 @@ wireproto.commands[b'greet'] = (greet, b'name',) srv = serverrepo() -clt = clientpeer(srv) +clt = clientpeer(srv, uimod.ui()) print(clt.greet(b"Foobar")) b = clt.iterbatch()