Mercurial > hg
changeset 28843:2c7e6f363138
tests: stop direct symbol import of mercurial modules in test-status-inprocess
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 05 Apr 2016 23:38:00 +0900 |
parents | d466facc5a6e |
children | 99a2bdad0fda |
files | tests/test-status-inprocess.py |
diffstat | 1 files changed, 11 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-status-inprocess.py Tue Apr 05 23:35:45 2016 +0900 +++ b/tests/test-status-inprocess.py Tue Apr 05 23:38:00 2016 +0900 @@ -1,21 +1,16 @@ #!/usr/bin/env python from __future__ import absolute_import, print_function -from mercurial.ui import ( - ui, -) -from mercurial.localrepo import ( - localrepository, -) -from mercurial.commands import ( - add, - commit, - status, + +from mercurial import ( + commands, + localrepo, + ui as uimod, ) -u = ui() +u = uimod.ui() print('% creating repo') -repo = localrepository(u, '.', create=True) +repo = localrepo.localrepository(u, '.', create=True) f = open('test.py', 'w') try: @@ -24,9 +19,9 @@ f.close print('% add and commit') -add(u, repo, 'test.py') -commit(u, repo, message='*') -status(u, repo, clean=True) +commands.add(u, repo, 'test.py') +commands.commit(u, repo, message='*') +commands.status(u, repo, clean=True) print('% change') @@ -37,4 +32,4 @@ f.close() # this would return clean instead of changed before the fix -status(u, repo, clean=True, modified=True) +commands.status(u, repo, clean=True, modified=True)