diff options
author | Adi Roiban <adi.roiban@chevah.com> | 2018-04-08 16:19:11 +0100 |
---|---|---|
committer | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2018-04-08 10:19:11 -0500 |
commit | 5d31e7ee2e5996be10a0452d4b01b799a6698ad5 (patch) | |
tree | 434e7be1531636dca58e4ffde4b6b340febfa3aa /CONTRIBUTING.rst | |
parent | 9f225ac876b6340825770c9c665060dfc28300c6 (diff) | |
download | pep8-5d31e7ee2e5996be10a0452d4b01b799a6698ad5.tar.gz |
Add variables so blank lines may be configures
This adds some module level configuration points for users to define
how many blank lines they want in their code. It paves the way for
someone to develop a flake8 plugin to configure this in pycodestyle.
Fixes #732
Diffstat (limited to 'CONTRIBUTING.rst')
-rw-r--r-- | CONTRIBUTING.rst | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index aad6ad6..9f55859 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -66,6 +66,44 @@ At this point you can create a pull request back to the official pycodestyles repository for review! For more information on how to make a pull request, GitHub has an excellent `guide`_. +The current tests are written in 2 styles: + +* standard xUnit based only on stdlib unittest + (can be executed with nose) +* functional test using a custom framework and executed by the + pycodestyle itself when installed in dev mode. + + +Running unittest +~~~~~~~~~~~~~~~~ + +While the tests are writted using stdlib `unittest` module, the existing +test include unit, integration and functional tests. + +There are a couple of ways to run the tests:: + + $ python setup.py test + $ # Use nose to run specific test + $ nosetests \ + > testsuite.test_blank_lines:TestBlankLinesDefault.test_initial_no_blank + $ # Use nose to run a subset and check coverage, and check the resulting + $ $ cover/pycodestyle_py.html in your browser + $ nosetests --with-coverage --cover-html -s testsuite.test_blank_lines + + +Running functional +~~~~~~~~~~~~~~~~~~ + +When installed in dev mode, pycodestyle will have the `--testsuite` +option which can be used to run the tests:: + + $ pip install -e . + $ # Run all tests. + $ pycodestyle --testsuite testsuite + $ # Run a subset of the tests. + $ pycodestyle --testsuite testsuite/E30.py + + .. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/ .. _guide: https://guides.github.com/activities/forking/ .. _tox: https://tox.readthedocs.io/en/latest/ |