summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2013-07-04 11:40:27 -0500
committerSkip Montanaro <skip@pobox.com>2013-07-04 11:40:27 -0500
commite97a8a5055f3157ef4d47c830d07d07a1b8c7f10 (patch)
tree1046df635d23deed408d689edc913ca9b1de053a /doc
parenta66cb39eb66e359e93f0d2ee2edf58bad72d8ca7 (diff)
downloadpylint-e97a8a5055f3157ef4d47c830d07d07a1b8c7f10.tar.gz
Describe a more workable unit test setup.
Diffstat (limited to 'doc')
-rw-r--r--doc/contribute.rst30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/contribute.rst b/doc/contribute.rst
index d938ec5..ad98589 100644
--- a/doc/contribute.rst
+++ b/doc/contribute.rst
@@ -76,3 +76,33 @@ patch gets accepted.
- Relate your change to an issue in the tracker
- Send a pull request from bitbucket
+
+Unit test setup
+---------------
+
+To run the pylint unit tests within your checkout (without having to install
+anything), you need to set PYTHONPATH so that pylint, astroid and the
+logilab-common are available. Assume you have those packages in ~/src. If
+you have a normal clone of logilab-common, it will not be properly
+structured to allow import of logilab.common. To remedy this, create the
+necessary structure::
+
+ cd ~/src
+ mkdir logilab
+ mv logilab-common logilab/common
+ touch logilab/__init__.py
+
+Now, set PYTHONPATH to your src directory::
+
+ export PYTHONPATH=~/src
+
+You now have access to the astroid, logilab.common and pylint packages
+without installing them. You can run all the unit tests like so::
+
+ cd ~/src/pylint/test
+ for f in *.py ; do
+ echo $f
+ python -S $f
+ done
+
+The -S flag keeps distutils from interfering with sys.path. YMMV.