#168 pylint/pep8 for test files undefined, commit check fails.
Closed: Fixed Opened by leamas.

The "official" pep8/pylint checks does not apply to the test files test/*.py. The immediate problem is that the commit checks always fails, lot's of errors, when committing test code.

We need to decide how to treat this code. If it should not be pep8/pylint checked, the commit hook should be fixed to avoid checking test files.

If the test files should be checked, they need an overhaul. Still, it probably wise to do this in a separate context with specific pylint.conf and perhaps also pep8 exceptions. After all, in test code you do things not done in regular code.


Test now passes pep8 and pylint: 82009e4df4446732a4f and 1de9ad4a9c8f2dcf429.

Basic problem remains: the pylint/pep8 checks are run in the same context for both the "real" code and the test code. Currently, pylint fails because of bad load paths when invoked on test code from top dir.

While it is possible to run the tests using PYTHONPATH=src:.:test this is really a bad idea; doing so means production code depends on the tests.

Possibly, this boils down to that pep8/pylint for the test files should be run from the test dir, while other tests are run from top dir as today.

Fixed in 13b86c1d092f7966e52

Metadata