tests: enable import checker for all python files (including no .py files)
i18n/posplit is excluded as it couldn't be trivially fixed. That's the same
as
99a2bdad0fda.
--- a/contrib/import-checker.py Sun May 15 10:45:32 2016 +0900
+++ b/contrib/import-checker.py Sun May 15 10:48:05 2016 +0900
@@ -663,7 +663,7 @@
the input file.
"""
py = False
- if f.endswith('.py'):
+ if not f.endswith('.t'):
with open(f) as src:
yield src.read(), modname, f, 0
py = True
--- a/tests/test-check-module-imports.t Sun May 15 10:45:32 2016 +0900
+++ b/tests/test-check-module-imports.t Sun May 15 10:48:05 2016 +0900
@@ -156,12 +156,13 @@
Known-bad files are excluded by -X as some of them would produce unstable
outputs, which should be fixed later.
- $ hg locate '**.py' \
+ $ hg locate 'set:**.py or grep(r"^#!.*?python")' \
> 'tests/**.t' \
> -X contrib/debugshell.py \
> -X contrib/win32/hgwebdir_wsgi.py \
> -X doc/gendoc.py \
> -X doc/hgmanpage.py \
+ > -X i18n/posplit \
> -X tests/test-hgweb-auth.py \
> -X tests/hypothesishelpers.py \
> -X tests/test-ctxmanager.py \