summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Cordasco <sigmavirus24@users.noreply.github.com>2016-05-24 12:25:09 -0500
committerIan Cordasco <sigmavirus24@users.noreply.github.com>2016-05-24 12:25:09 -0500
commit54ea3053056f728d2108fb42491b0b225cc997a3 (patch)
tree100ab0acdf3de1f2db421a9dd1ad946874ffcb16
parent3141151274639af01c1fddb9fae6b4b5f42d790e (diff)
parentcec28bef2c30100b3d7cc669cd58ad8b3adcd618 (diff)
downloadpep8-54ea3053056f728d2108fb42491b0b225cc997a3.tar.gz
Merge pull request #509 from PyCQA/gh-500
Merge Pull Request #500
-rw-r--r--docs/advanced.rst21
1 files changed, 19 insertions, 2 deletions
diff --git a/docs/advanced.rst b/docs/advanced.rst
index 62c1b90..de3be69 100644
--- a/docs/advanced.rst
+++ b/docs/advanced.rst
@@ -8,7 +8,7 @@ Advanced usage
Automated tests
---------------
-You can also execute `pep8` tests from Python code. For example, this
+You can also execute ``pep8`` tests from Python code. For example, this
can be highly useful for automated testing of coding style conformance
in your project::
@@ -25,7 +25,7 @@ in your project::
self.assertEqual(result.total_errors, 0,
"Found code style errors (and warnings).")
-If you are using `nosetests` for running tests, remove `quiet=True`
+If you are using ``nosetests`` for running tests, remove ``quiet=True``
since Nose suppresses stdout.
There's also a shortcut for checking a single file::
@@ -38,6 +38,23 @@ There's also a shortcut for checking a single file::
print("Found %s errors (and warnings)" % file_errors)
+Configuring tests
+-----------------
+
+You can configure automated ``pep8`` tests in a variety of ways.
+
+For example, you can pass in a path to a configuration file that ``pep8``
+should use::
+
+ import pep8
+
+ pep8style = pep8.StyleGuide(config_file='/path/to/tox.ini')
+
+You can also set specific options explicitly::
+
+ pep8style = pep8.StyleGuide(ignore=['E501'])
+
+
Skip file header
----------------