summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2012-12-18 23:03:27 +0100
committerFlorent Xicluna <florent.xicluna@gmail.com>2012-12-18 23:03:27 +0100
commitbcefb5856b29175f651501f4de681b1153257c2a (patch)
tree9f6f95fa27b1e292bbba3c86e40acaf41abadf63
parentcb298a0b3ea506a80efed801902f8513328a44c3 (diff)
downloadpep8-bcefb5856b29175f651501f4de681b1153257c2a.tar.gz
Review README wording
-rw-r--r--README.rst11
1 files changed, 7 insertions, 4 deletions
diff --git a/README.rst b/README.rst
index fe877dd..826c4cb 100644
--- a/README.rst
+++ b/README.rst
@@ -127,19 +127,21 @@ Calling `pep8` from Python
--------------------------
You can also execute `pep8` tests from Python code. For example, this
-can be highly useful for automated testing of code format in your
-projects::
+can be highly useful for automated testing of coding style conformance
+in your project::
import unittest
- import pep
+ import pep8
+
class TestCodeFormat(unittest.TestCase):
+
def test_pep8_conformance(self):
"""Test that we conform to PEP8."""
pep8style = pep8.StyleGuide(quiet=True)
result = pep8style.check_files(['file1.py', 'file2.py'])
self.assertEqual(result.total_errors, 0,
- "Found code syntax errors (and warnings).")
+ "Found code style errors (and warnings).")
If you are using `nosetests` for running tests, remove `quiet=True`
since Nose suppresses stdout.
@@ -153,6 +155,7 @@ There's also a shortcut for checking a single file::
print("Found %s errors (and warnings)" % file_errors)
+
Feedback
--------