##// END OF EJS Templates
tests: add repository check for pyflakes test...
Matt Mackall -
r21208:0e1cbd3d stable
parent child Browse files
Show More
@@ -259,6 +259,10 b' def has_system_sh():'
259 def has_serve():
259 def has_serve():
260 return os.name != 'nt' # gross approximation
260 return os.name != 'nt' # gross approximation
261
261
262 def has_test_repo():
263 t = os.environ["TESTDIR"]
264 return os.path.isdir(os.path.join(t, "..", ".hg"))
265
262 def has_tic():
266 def has_tic():
263 try:
267 try:
264 import curses
268 import curses
@@ -317,6 +321,7 b' checks = {'
317 "svn-bindings": (has_svn_bindings, "subversion python bindings"),
321 "svn-bindings": (has_svn_bindings, "subversion python bindings"),
318 "symlink": (has_symlink, "symbolic links"),
322 "symlink": (has_symlink, "symbolic links"),
319 "system-sh": (has_system_sh, "system() uses sh"),
323 "system-sh": (has_system_sh, "system() uses sh"),
324 "test-repo": (has_test_repo, "running tests from repository"),
320 "tic": (has_tic, "terminfo compiler and curses module"),
325 "tic": (has_tic, "terminfo compiler and curses module"),
321 "tla": (has_tla, "GNU Arch tla client"),
326 "tla": (has_tla, "GNU Arch tla client"),
322 "unix-permissions": (has_unix_permissions, "unix-style permissions"),
327 "unix-permissions": (has_unix_permissions, "unix-style permissions"),
@@ -1,8 +1,10 b''
1 $ "$TESTDIR/hghave" pyflakes || exit 80
1 #if test-repo pyflakes
2
2 $ cd "`dirname "$TESTDIR"`"
3 $ cd "`dirname "$TESTDIR"`"
3
4
4 run pyflakes on all tracked files ending in .py or without a file ending
5 run pyflakes on all tracked files ending in .py or without a file ending
5 (skipping binary file random-seed)
6 (skipping binary file random-seed)
7
6 $ hg manifest 2>/dev/null | egrep "\.py$|^[^.]*$" | grep -v /random_seed$ \
8 $ hg manifest 2>/dev/null | egrep "\.py$|^[^.]*$" | grep -v /random_seed$ \
7 > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
9 > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
8 contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob)
10 contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob)
@@ -16,4 +18,4 b' run pyflakes on all tracked files ending'
16 tests/hghave.py:*: 'ssl' imported but unused (glob)
18 tests/hghave.py:*: 'ssl' imported but unused (glob)
17 contrib/win32/hgwebdir_wsgi.py:93: 'from isapi.install import *' used; unable to detect undefined names (glob)
19 contrib/win32/hgwebdir_wsgi.py:93: 'from isapi.install import *' used; unable to detect undefined names (glob)
18
20
19
21 #endif
General Comments 0
You need to be logged in to leave comments. Login now