added pep8 dependency for tests
This commit is contained in:
parent
6284c29c86
commit
59ffe6fae2
1
tox.ini
1
tox.ini
|
@ -9,5 +9,6 @@ envlist = py27, py32, py33, pypy
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
nose
|
nose
|
||||||
|
pep8
|
||||||
commands =
|
commands =
|
||||||
nosetests
|
nosetests
|
||||||
|
|
|
@ -43,8 +43,8 @@ class TestXvfb(unittest.TestCase):
|
||||||
class Pep8ConformanceTestCase(unittest.TestCase):
|
class Pep8ConformanceTestCase(unittest.TestCase):
|
||||||
"""Test that all code conforms to PEP8."""
|
"""Test that all code conforms to PEP8."""
|
||||||
def test_pep8_conformance(self):
|
def test_pep8_conformance(self):
|
||||||
# scan entire package recursively starting from root directory
|
# scan source files in this directory recursively
|
||||||
root_dirname = os.path.dirname(os.path.realpath(__file__ + '/..'))
|
this_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
self.pep8style = pep8.StyleGuide()
|
self.pep8style = pep8.StyleGuide()
|
||||||
self.pep8style.input_dir(root_dirname)
|
self.pep8style.input_dir(this_dir)
|
||||||
self.assertEqual(self.pep8style.options.report.total_errors, 0)
|
self.assertEqual(self.pep8style.options.report.total_errors, 0)
|
||||||
|
|
Loading…
Reference in New Issue