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

Yuya Nishihara yuya at tcha.org
Sat Apr 9 06:56:19 EDT 2016


# 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

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]


More information about the Mercurial-devel mailing list