File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Advanced usage
8
8
Automated tests
9
9
---------------
10
10
11
- You can also execute `pep8 ` tests from Python code. For example, this
11
+ You can also execute `` pep8 ` ` tests from Python code. For example, this
12
12
can be highly useful for automated testing of coding style conformance
13
13
in your project::
14
14
@@ -25,7 +25,7 @@ in your project::
25
25
self.assertEqual(result.total_errors, 0,
26
26
"Found code style errors (and warnings).")
27
27
28
- If you are using `nosetests ` for running tests, remove `quiet=True `
28
+ If you are using `` nosetests `` for running tests, remove `` quiet=True ` `
29
29
since Nose suppresses stdout.
30
30
31
31
There's also a shortcut for checking a single file::
@@ -38,6 +38,23 @@ There's also a shortcut for checking a single file::
38
38
print("Found %s errors (and warnings)" % file_errors)
39
39
40
40
41
+ Configuring tests
42
+ -----------------
43
+
44
+ You can configure automated ``pep8 `` tests in a variety of ways.
45
+
46
+ For example, you can pass in a path to a configuration file that ``pep8 ``
47
+ should use::
48
+
49
+ import pep8
50
+
51
+ pep8style = pep8.StyleGuide(config_file='/path/to/tox.ini')
52
+
53
+ You can also set specific options explicitly::
54
+
55
+ pep8style = pep8.StyleGuide(ignore=['E501'])
56
+
57
+
41
58
Skip file header
42
59
----------------
43
60
You can’t perform that action at this time.
0 commit comments