[PATCH 1 of 8] tests: make test-url use absolute_import
Yuya Nishihara
yuya at tcha.org
Sat Apr 9 06:51:41 EDT 2016
On Sat, 09 Apr 2016 03:02:11 -0500, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1460159192 -19800
> # Sat Apr 09 05:16:32 2016 +0530
> # Node ID 5edebcde46b922ac5e448aedc96958958764c26f
> # Parent c5565fc8848dd084d104ca40c33d1acdfcff8bc6
> tests: make test-url use absolute_import
>
> 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
> @@ -68,7 +68,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-url.py not using absolute_import
>
> #if py3exe
> $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
> diff --git a/tests/test-url.py b/tests/test-url.py
> --- a/tests/test-url.py
> +++ b/tests/test-url.py
> @@ -1,4 +1,4 @@
> -from __future__ import print_function
> +from __future__ import absolute_import, print_function
> import os
This enables the check for modern convention and would generate a lot of
warnings, which aren't covered by the test suite right now.
I'll soon send patches that enable import-checker.py for tests/, so can you
fix problems spotted by import-checker.py?
More information about the Mercurial-devel
mailing list