diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -95,15 +95,16 @@ Check that extensions are loaded in phases: $ cat > foo.py < from __future__ import print_function > import os > name = os.path.basename(__file__).rsplit('.', 1)[0] - > print("1) %s imported" % name) + > print("1) %s imported" % name, flush=True) > def uisetup(ui): - > print("2) %s uisetup" % name) + > print("2) %s uisetup" % name, flush=True) > def extsetup(): - > print("3) %s extsetup" % name) + > print("3) %s extsetup" % name, flush=True) > def reposetup(ui, repo): - > print("4) %s reposetup" % name) + > print("4) %s reposetup" % name, flush=True) > > bytesname = name.encode('utf-8') > # custom predicate to check registration of functions at loading @@ -188,14 +189,14 @@ $ echo "s = 'libroot/mod/ambig.py'" > $TESTTMP/libroot/mod/ambig.py $ cat > $TESTTMP/libroot/mod/ambigabs.py < from __future__ import absolute_import + > from __future__ import absolute_import, print_function > import ambig # should load "libroot/ambig.py" > s = ambig.s > EOF $ cat > loadabs.py < import mod.ambigabs as ambigabs > def extsetup(): - > print('ambigabs.s=%s' % ambigabs.s) + > print('ambigabs.s=%s' % ambigabs.s, flush=True) > EOF $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root) ambigabs.s=libroot/ambig.py @@ -203,13 +204,14 @@ #if no-py3k $ cat > $TESTTMP/libroot/mod/ambigrel.py < from __future__ import print_function > import ambig # should load "libroot/mod/ambig.py" > s = ambig.s > EOF $ cat > loadrel.py < import mod.ambigrel as ambigrel > def extsetup(): - > print('ambigrel.s=%s' % ambigrel.s) + > print('ambigrel.s=%s' % ambigrel.s, flush=True) > EOF $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) ambigrel.s=libroot/mod/ambig.py @@ -1739,12 +1741,13 @@ $ hg init $TESTTMP/opt-unicode-default $ cat > $TESTTMP/test_unicode_default_value.py << EOF + > from __future__ import print_function > from mercurial import registrar > cmdtable = {} > command = registrar.command(cmdtable) > @command(b'dummy', [(b'', b'opt', u'value', u'help')], 'ext [OPTIONS]') > def ext(*args, **opts): - > print(opts[b'opt']) + > print(opts[b'opt'], flush=True) > EOF $ cat > $TESTTMP/opt-unicode-default/.hg/hgrc << EOF > [extensions]