changeset 32459:778dc37ce683

check: check modules in hgdemandimport A few places only check modules in mercurial and hgext. Add hgdemandimport to the list in those places.
author Siddharth Agarwal <sid0@fb.com>
date Sun, 21 May 2017 13:44:26 -0700
parents 0906b85bf222
children f37f9499fea8
files contrib/check-py3-compat.py tests/test-check-help.t tests/test-check-pylint.t
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-py3-compat.py	Sun May 21 12:10:53 2017 -0700
+++ b/contrib/check-py3-compat.py	Sun May 21 13:44:26 2017 -0700
@@ -51,9 +51,10 @@
         return
 
     # Try to import the module.
-    # For now we only support mercurial.* and hgext.* modules because figuring
-    # out module paths for things not in a package can be confusing.
-    if f.startswith(('hgext/', 'mercurial/')) and not f.endswith('__init__.py'):
+    # For now we only support modules in packages because figuring out module
+    # paths for things not in a package can be confusing.
+    if (f.startswith(('hgdemandimport/', 'hgext/', 'mercurial/'))
+        and not f.endswith('__init__.py')):
         assert f.endswith('.py')
         name = f.replace('/', '.')[:-3]
         try:
--- a/tests/test-check-help.t	Sun May 21 12:10:53 2017 -0700
+++ b/tests/test-check-help.t	Sun May 21 13:44:26 2017 -0700
@@ -23,6 +23,6 @@
 Check if ":hg:`help TOPIC`" is valid:
 (use "xargs -n1 -t" to see which help commands are executed)
 
-  $ hg files 'glob:{hgext,mercurial}/**/*.py' | sed 's|\\|/|g' \
+  $ hg files 'glob:{hgdemandimport,hgext,mercurial}/**/*.py' | sed 's|\\|/|g' \
   > | xargs python "$TESTTMP/scanhelptopics.py" \
   > | xargs -n1 hg help > /dev/null
--- a/tests/test-check-pylint.t	Sun May 21 12:10:53 2017 -0700
+++ b/tests/test-check-pylint.t	Sun May 21 13:44:26 2017 -0700
@@ -12,7 +12,7 @@
   $ touch $TESTTMP/fakerc
   $ pylint --rcfile=$TESTTMP/fakerc --disable=all \
   >   --enable=W0102 --reports=no \
-  >   mercurial hgext hgext3rd
+  >   mercurial hgdemandimport hgext hgext3rd
    (?)
   ------------------------------------ (?)
   Your code has been rated at 10.00/10 (?)