# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1459249892 -19800 # Node ID 2e5be704bc963e5964ca70ce8016ea92e15b9460 # Parent eda8b28e3b1b17bfe3d637e4a43911c13fd60197 py3: make test-ui-color use print_function diff -r eda8b28e3b1b -r 2e5be704bc96 tests/test-check-py3-compat.t --- 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' (, line *) (glob) tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/test-trusted.py: invalid syntax: invalid syntax (, line *) (glob) - tests/test-ui-color.py: invalid syntax: invalid syntax (, line *) (glob) #endif diff -r eda8b28e3b1b -r 2e5be704bc96 tests/test-ui-color.py --- 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)))