Mercurial > hg
changeset 28800:544908ae36ce
test-batching: stop direct symbol import of mercurial modules
Silences future errors reported by import-checker.py.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 05 Apr 2016 23:10:13 +0900 |
parents | ccab2923a093 |
children | 441491aba8c3 |
files | tests/test-batching.py |
diffstat | 1 files changed, 10 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-batching.py Wed Jan 06 17:18:18 2016 +0000 +++ b/tests/test-batching.py Tue Apr 05 23:10:13 2016 +0900 @@ -6,13 +6,10 @@ # GNU General Public License version 2 or any later version. from __future__ import absolute_import, print_function -from mercurial.peer import ( - localbatch, - batchable, - future, -) -from mercurial.wireproto import ( - remotebatch, + +from mercurial import ( + peer, + wireproto, ) # equivalent of repo.repository @@ -32,7 +29,7 @@ return "Hello, %s" % name def batch(self): '''Support for local batching.''' - return localbatch(self) + return peer.localbatch(self) # usage of "thing" interface def use(it): @@ -152,20 +149,20 @@ return res.split(';') def batch(self): - return remotebatch(self) + return wireproto.remotebatch(self) - @batchable + @peer.batchable def foo(self, one, two=None): if not one: yield "Nope", None encargs = [('one', mangle(one),), ('two', mangle(two),)] - encresref = future() + encresref = peer.future() yield encargs, encresref yield unmangle(encresref.value) - @batchable + @peer.batchable def bar(self, b, a): - encresref = future() + encresref = peer.future() yield [('b', mangle(b),), ('a', mangle(a),)], encresref yield unmangle(encresref.value)