changeset 19022:cba222f01056

tests: run check-code on Python files without .py extension
author Mads Kiilerich <madski@unity3d.com>
date Wed, 17 Apr 2013 03:39:36 +0200
parents 26b41a902195
children 86531a7038ed
files contrib/simplemerge contrib/undumprevlog tests/test-check-code-hg.t
diffstat 3 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/simplemerge	Tue Apr 16 21:14:50 2013 +0200
+++ b/contrib/simplemerge	Wed Apr 17 03:39:36 2013 +0200
@@ -44,7 +44,7 @@
 try:
     for fp in (sys.stdin, sys.stdout, sys.stderr):
         util.setbinary(fp)
-    
+
     opts = {}
     try:
         args = fancyopts.fancyopts(sys.argv[1:], options, opts)
--- a/contrib/undumprevlog	Tue Apr 16 21:14:50 2013 +0200
+++ b/contrib/undumprevlog	Wed Apr 17 03:39:36 2013 +0200
@@ -11,7 +11,7 @@
 
 opener = scmutil.opener('.', False)
 tr = transaction.transaction(sys.stderr.write, opener, "undump.journal")
-while 1:
+while True:
     l = sys.stdin.readline()
     if not l:
         break
--- a/tests/test-check-code-hg.t	Tue Apr 16 21:14:50 2013 +0200
+++ b/tests/test-check-code-hg.t	Wed Apr 17 03:39:36 2013 +0200
@@ -11,3 +11,19 @@
   $ hg manifest 2>/dev/null \
   >   | xargs "$check_code" --warnings --nolineno --per-file=0 \
   >   || false
+
+Check Python files without py extension
+
+  $ cp \
+  >   hg \
+  >   hgweb.cgi \
+  >   contrib/convert-repo \
+  >   contrib/dumprevlog \
+  >   contrib/hgweb.fcgi \
+  >   contrib/hgweb.wsgi \
+  >   contrib/simplemerge \
+  >   contrib/undumprevlog \
+  >   "$TESTTMP"/
+  $ for f in "$TESTTMP"/*; do cp "$f" "$f.py"; done
+  $ "$check_code" --warnings --nolineno --per-file=0 "$TESTTMP"/*.py \
+  >   || false