Mercurial > hg
changeset 28682:2e5be704bc96
py3: make test-ui-color use print_function
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 29 Mar 2016 16:41:32 +0530 |
parents | eda8b28e3b1b |
children | d0210a35c81a |
files | tests/test-check-py3-compat.t tests/test-ui-color.py |
diffstat | 2 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-check-py3-compat.t Tue Mar 29 16:38:27 2016 +0530 +++ b/tests/test-check-py3-compat.t Tue Mar 29 16:41:32 2016 +0530 @@ -108,7 +108,6 @@ tests/test-trusted.py not using absolute_import tests/test-trusted.py requires print_function tests/test-ui-color.py not using absolute_import - tests/test-ui-color.py requires print_function tests/test-url.py not using absolute_import #if py3exe @@ -290,6 +289,5 @@ tests/test-revlog-ancestry.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) - tests/test-ui-color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) #endif
--- a/tests/test-ui-color.py Tue Mar 29 16:38:27 2016 +0530 +++ b/tests/test-ui-color.py Tue Mar 29 16:41:32 2016 +0530 @@ -1,3 +1,4 @@ +from __future__ import print_function import os from hgext import color from mercurial import dispatch, ui @@ -8,7 +9,7 @@ testui.write(('buffered\n')) testui.warn(('warning\n')) testui.write_err('error\n') -print repr(testui.popbuffer()) +print(repr(testui.popbuffer())) # test dispatch.dispatch with the same ui object hgrc = open(os.environ["HGRCPATH"], 'w') @@ -28,6 +29,6 @@ dispatch.dispatch(dispatch.request(['version', '-q'], ui_)) runcmd() -print "colored? " + str(issubclass(ui_.__class__, color.colorui)) +print("colored? " + str(issubclass(ui_.__class__, color.colorui))) runcmd() -print "colored? " + str(issubclass(ui_.__class__, color.colorui)) +print("colored? " + str(issubclass(ui_.__class__, color.colorui)))