diff --git a/requirements.txt b/requirements.txt
index 1dde9cc..2d4bd5e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,5 +2,3 @@ rst2pdf
 sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
 sphinxcontrib-httpdomain
 sphinx_rtd_theme
-testrepository>=0.0.18
-testtools>=0.9.34
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..f640b71
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,4 @@
+hacking>=0.10.0,<0.11
+
+testrepository>=0.0.18
+testtools>=0.9.34
diff --git a/tests/test_titles.py b/tests/test_titles.py
index bae5540..38056d2 100644
--- a/tests/test_titles.py
+++ b/tests/test_titles.py
@@ -99,12 +99,12 @@ class TestTitles(testtools.TestCase):
 
             for ex_s in extra_subsections:
                 s_name = (ex_s if type(ex_s) is str or
-                                  type(ex_s) is unicode else ex_s["name"])
+                          type(ex_s) is unicode else ex_s["name"])
                 if s_name.startswith("Test Case"):
                     new_missing_subsections = []
                     for m_s in missing_subsections:
                         m_s_name = (m_s if type(m_s) is str or
-                                           type(m_s) is unicode
+                                    type(m_s) is unicode
                                     else m_s["name"])
                         if not m_s_name.startswith("Test Case"):
                             new_missing_subsections.append(m_s)
diff --git a/tox.ini b/tox.ini
index 3cb4c34..f4579f7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = docs,py27
+envlist = docs,py27,pep8
 minversion = 1.6
 skipsdist = True
 
@@ -13,15 +13,23 @@ setenv = VIRTUAL_ENV={envdir}
          LANG=en_US.UTF-8
          LANGUAGE=en_US:en
          LC_ALL=C
-deps = -r{toxinidir}/requirements.txt
+deps = -r{toxinidir}/test-requirements.txt
 commands =
   python setup.py test --slowest --testr-args='{posargs}'
 
 [testenv:venv]
 commands = {posargs}
 
+[testenv:pep8]
+commands = flake8
+
 [testenv:docs]
 commands =
     sphinx-build -b html doc/source/ doc/build/html
     sphinx-build -b latex doc/source/ doc/build/latex
     sphinx-build -b pdf doc/source/ doc/build/pdf
+
+[flake8]
+show-source = true
+builtins = _
+exclude=.venv*,.git,.tox,dist,doc,*lib/python*,*egg,build