[PATCH 8 of 8] tests: make test-ui-color use print_function
Pulkit Goyal
7895pulkit at gmail.com
Tue Mar 29 07:13:18 EDT 2016
# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1459249892 -19800
# Tue Mar 29 16:41:32 2016 +0530
# Node ID fb56bdeafdf9da03ac6c6c02f369b154964cbd26
# Parent 1e98e4d0cf04d4a89b4cf04a5dfab50d4f127edd
tests: make test-ui-color use print_function
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -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
diff --git a/tests/test-ui-color.py b/tests/test-ui-color.py
--- a/tests/test-ui-color.py
+++ b/tests/test-ui-color.py
@@ -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)))
More information about the Mercurial-devel
mailing list