[PATCH 7 of 7] tests: enable import checker for tests/**.py files

Augie Fackler raf at durin42.com
Sun Apr 10 12:20:41 EDT 2016


On Sat, Apr 09, 2016 at 07:56:19PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1459679937 -32400
> #      Sun Apr 03 19:38:57 2016 +0900
> # Node ID fe84c869007da526bb07c0ed54d3493d04b7dfcd
> # Parent  fa1fbae246e0dd2dfa2bd27c2f20f9d224f1f166
> tests: enable import checker for tests/**.py files

Queued these, thanks.

Have you done the work on contrib/**.py already, or should I tackle
that? Either way is fine.

>
> Several known-bad files are excluded as they couldn't be trivially fixed.
> In principle, we should fix them first, however, it would have more risk
> to keep Py3k porting going without the test coverage.
>
> Still contrib/**.py aren't covered, which needs another round.
>
> diff --git a/tests/test-check-module-imports.t b/tests/test-check-module-imports.t
> --- a/tests/test-check-module-imports.t
> +++ b/tests/test-check-module-imports.t
> @@ -141,6 +141,15 @@ here that we should still endeavor to fi
>  hidden by deduplication algorithm in the cycle detector, so fixing
>  these may expose other cycles.
>
> -  $ hg locate 'mercurial/**.py' 'hgext/**.py' | sed 's-\\-/-g' | python "$import_checker" -
> +Known-bad files are excluded by -X as some of them would produce unstable
> +outputs, which should be fixed later.
> +
> +  $ hg locate 'mercurial/**.py' 'hgext/**.py' 'tests/**.py' \
> +  > -X tests/test-hgweb-auth.py \
> +  > -X tests/hypothesishelpers.py \
> +  > -X tests/test-ctxmanager.py \
> +  > -X tests/test-lock.py \
> +  > -X tests/test-verify-repo-operations.py \
> +  > | sed 's-\\-/-g' | python "$import_checker" -
>    Import cycle: hgext.largefiles.basestore -> hgext.largefiles.localstore -> hgext.largefiles.basestore
>    [1]
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list