diff options
| author | Ian Lee <IanLee1521@gmail.com> | 2016-05-25 11:25:57 -0700 |
|---|---|---|
| committer | Ian Lee <IanLee1521@gmail.com> | 2016-05-26 00:45:23 -0700 |
| commit | ccc7f14000d92e8dc08bbdf34b9fac3435425087 (patch) | |
| tree | 4757cf8aaa07f81780a91cc38028caf43713f40c /testsuite/test_all.py | |
| parent | 90d83aa28ae6ed0ebc49cc83079364b172405fb8 (diff) | |
| download | pep8-package-pycodestyle.tar.gz | |
Updated tests and doc examples -> pycodestylepackage-pycodestyle
Diffstat (limited to 'testsuite/test_all.py')
| -rw-r--r-- | testsuite/test_all.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/testsuite/test_all.py b/testsuite/test_all.py index bfb61d5..bd18943 100644 --- a/testsuite/test_all.py +++ b/testsuite/test_all.py @@ -4,24 +4,26 @@ import os.path import sys import unittest -import pep8 +import pycodestyle from testsuite.support import init_tests, selftest, ROOT_DIR # Note: please only use a subset of unittest methods which were present # in Python 2.5: assert(True|False|Equal|NotEqual|Raises) -class Pep8TestCase(unittest.TestCase): +class PycodestyleTestCase(unittest.TestCase): """Test the standard errors and warnings (E and W).""" def setUp(self): - self._style = pep8.StyleGuide( + self._style = pycodestyle.StyleGuide( paths=[os.path.join(ROOT_DIR, 'testsuite')], select='E,W', quiet=True) def test_doctest(self): import doctest - fail_d, done_d = doctest.testmod(pep8, verbose=False, report=False) + fail_d, done_d = doctest.testmod( + pycodestyle, verbose=False, report=False + ) self.assertTrue(done_d, msg='tests not found') self.assertFalse(fail_d, msg='%s failure(s)' % fail_d) @@ -37,9 +39,9 @@ class Pep8TestCase(unittest.TestCase): msg='%s failure(s)' % report.total_errors) def test_own_dog_food(self): - files = [pep8.__file__.rstrip('oc'), __file__.rstrip('oc'), + files = [pycodestyle.__file__.rstrip('oc'), __file__.rstrip('oc'), os.path.join(ROOT_DIR, 'setup.py')] - report = self._style.init_report(pep8.StandardReport) + report = self._style.init_report(pycodestyle.StandardReport) report = self._style.check_files(files) self.assertFalse(report.total_errors, msg='Failures: %s' % report.messages) @@ -49,7 +51,7 @@ def suite(): from testsuite import test_api, test_parser, test_shell, test_util suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(Pep8TestCase)) + suite.addTest(unittest.makeSuite(PycodestyleTestCase)) suite.addTest(unittest.makeSuite(test_api.APITestCase)) suite.addTest(unittest.makeSuite(test_parser.ParserTestCase)) suite.addTest(unittest.makeSuite(test_shell.ShellTestCase)) |
