[PATCH 7 of 8] py3: make tests/readlink.py use print_function
timeless
timeless at gmail.com
Sun May 15 23:38:07 EDT 2016
This is wrong. I know because my series actually exercises it.
On May 15, 2016 8:37 PM, "Pulkit Goyal" <7895pulkit at gmail.com> wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1463358567 -19800
> # Mon May 16 05:59:27 2016 +0530
> # Node ID d2be814b555f17d9326278cf3f7686174eb3e289
> # Parent 4104b2d2afc0d245b033b682d8fe70a3253a4b2b
> py3: make tests/readlink.py use print_function
>
> diff --git a/tests/readlink.py b/tests/readlink.py
> --- a/tests/readlink.py
> +++ b/tests/readlink.py
> @@ -1,6 +1,6 @@
> #!/usr/bin/env python
>
> -from __future__ import absolute_import
> +from __future__ import absolute_import, print_function
>
> import errno
> import os
> @@ -8,10 +8,10 @@
>
> for f in sys.argv[1:]:
> try:
> - print f, '->', os.readlink(f)
> + print(f, '->', os.readlink(f))
> except OSError as err:
> if err.errno != errno.EINVAL:
> raise
> - print f, 'not a symlink'
> + print(f, 'not a symlink')
>
> sys.exit(0)
> 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
> @@ -27,7 +27,6 @@
> i18n/polib.py not using absolute_import
> setup.py not using absolute_import
> tests/heredoctest.py requires print_function
> - tests/readlink.py requires print_function
> tests/run-tests.py not using absolute_import
> tests/test-demandimport.py not using absolute_import
>
> @@ -149,6 +148,5 @@
> mercurial/win*.py: error importing module: <ImportError> No module
> named 'msvcrt' (line *) (glob)
> mercurial/windows.py: error importing module: <ImportError> No module
> named '_winreg' (line *) (glob)
> mercurial/wireproto.py: error importing module: <SyntaxError> invalid
> syntax (bundle*.py, line *) (line *) (glob)
> - tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *)
> (glob)
>
> #endif
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160515/14b8a1b5/attachment.html>
More information about the Mercurial-devel
mailing list