From 59ffe6fae291b525d7266211943d5cdfd5200146 Mon Sep 17 00:00:00 2001 From: Corey Goldberg Date: Thu, 25 Apr 2013 08:35:03 -0400 Subject: [PATCH] added pep8 dependency for tests --- tox.ini | 1 + xvfbwrapper/test_xvfb.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index d6d6ee3..09ae245 100644 --- a/tox.ini +++ b/tox.ini @@ -9,5 +9,6 @@ envlist = py27, py32, py33, pypy [testenv] deps = nose + pep8 commands = nosetests diff --git a/xvfbwrapper/test_xvfb.py b/xvfbwrapper/test_xvfb.py index e0f0e53..fa50628 100644 --- a/xvfbwrapper/test_xvfb.py +++ b/xvfbwrapper/test_xvfb.py @@ -43,8 +43,8 @@ class TestXvfb(unittest.TestCase): class Pep8ConformanceTestCase(unittest.TestCase): """Test that all code conforms to PEP8.""" def test_pep8_conformance(self): - # scan entire package recursively starting from root directory - root_dirname = os.path.dirname(os.path.realpath(__file__ + '/..')) + # scan source files in this directory recursively + this_dir = os.path.dirname(os.path.realpath(__file__)) 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)