Add pep8 job and fix pep8 errors

Move test requirements to the separated file

Change-Id: I4e6e163ede94fb2337c4b0d3ea021a4a6c2c77f4
This commit is contained in:
Dina Belova 2016-01-22 13:27:01 +03:00
parent bf5b1160e4
commit b486eee8f0
4 changed files with 16 additions and 6 deletions

View File

@ -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

4
test-requirements.txt Normal file
View File

@ -0,0 +1,4 @@
hacking>=0.10.0,<0.11
testrepository>=0.0.18
testtools>=0.9.34

View File

@ -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)

12
tox.ini
View File

@ -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