diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2012-12-18 23:03:27 +0100 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2012-12-18 23:03:27 +0100 |
commit | bcefb5856b29175f651501f4de681b1153257c2a (patch) | |
tree | 9f6f95fa27b1e292bbba3c86e40acaf41abadf63 /README.rst | |
parent | cb298a0b3ea506a80efed801902f8513328a44c3 (diff) | |
download | pep8-bcefb5856b29175f651501f4de681b1153257c2a.tar.gz |
Review README wording
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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 -------- |