diff --git a/tests/generate-working-copy-states.py b/tests/generate-working-copy-states.py --- a/tests/generate-working-copy-states.py +++ b/tests/generate-working-copy-states.py @@ -29,7 +29,7 @@ # $ hg forget *_*_*-untracked # $ rm *_*_missing-* -from __future__ import absolute_import +from __future__ import absolute_import, print_function import os import sys @@ -66,7 +66,7 @@ combinations = sorted(generatestates(max content = [] for filename, states in combinations: if target == 'filelist': - print filename + print(filename) elif target == 'state': if depth == 'wc': # Make sure there is content so the file gets written and can be @@ -75,7 +75,7 @@ for filename, states in combinations: else: content.append((filename, states[int(depth) - 1])) else: - print >> sys.stderr, "unknown target:", target + print("unknown target:", target, file=sys.stderr) sys.exit(1) # write actual content 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 @@ -40,7 +40,6 @@ i18n/check-translation.py not using absolute_import i18n/polib.py not using absolute_import setup.py not using absolute_import - tests/generate-working-copy-states.py requires print_function tests/get-with-headers.py requires print_function tests/heredoctest.py requires print_function tests/hypothesishelpers.py not using absolute_import @@ -258,7 +257,6 @@ mercurial/win*.py: error importing module: No module named 'msvcrt' (line *) (glob) mercurial/windows.py: error importing module: No module named '_winreg' (line *) (glob) mercurial/wireproto.py: error importing module: invalid syntax (bundle*.py, line *) (line *) (glob) - tests/generate-working-copy-states.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/get-with-headers.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/readlink.py: invalid syntax: invalid syntax (, line *) (glob) tests/silenttestrunner.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob)