# HG changeset patch # User Pierre-Yves David # Date 2010-03-16 18:52:55 # Node ID 83dce0f817f471faa20a9518da9a4edc418c7876 # Parent 9c0a1887bd4b6a694f3d5a928628c5651b4d4214 add a small test for contrib/check-code.py This changeset adds a test file for contrib/check-code.py. This test runs check-code.py against two small files. The first file should not raise any check-code.py error while the second should. A line contains multiple errors to verify the check-code.py behaviour: In the case of multiple errors at the same line, the context line should only be displayed once. diff --git a/tests/test-check-code b/tests/test-check-code new file mode 100755 --- /dev/null +++ b/tests/test-check-code @@ -0,0 +1,16 @@ +#!/bin/sh +#cd `dirname $0` +cat > correct.py < wrong.py < def toto( arg1, arg2): + gratuitous whitespace in () or [] +./wrong.py:2: + > del(arg2) + del isn't a function +./wrong.py:3: + > return ( 5+6, 9) + missing whitespace in expression + gratuitous whitespace in () or []