diff --git a/test-requirements.txt b/test-requirements.txt index ae66aaae..16b030aa 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,8 +1,16 @@ +# Install bounded pep8/pyflakes first, then let flake8 install +pep8==1.4.5 +pyflakes==0.7.2 +flake8==2.0 +hacking>=0.5.3,<0.6 + nose>=1.2.1 nosexcover>=1.0.7 openstack.nose_plugin>=0.11 -pep8==1.1 sphinx>=1.1.2 unittest2>=0.5.1 testtools -mock>=1.0.1 \ No newline at end of file +# This used to be but openstack/requirements is set to [below]. +# If this breaks we 1) fix tests to use [below] or +# 2) petition to use mock>=1.0.1 +mock>=0.8.0 diff --git a/tests/test_base.py b/tests/test_base.py index a9ab5cdc..5cbd590f 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -386,7 +386,7 @@ class ResourceTest(TestCase): robj._add_details(info_) expected = "" - self.assertEqual(expected, robj.__repr__()) + self.assertEqual(expected, robj.__repr__()) def test_get(self): robj = self.get_mock_resource_obj() diff --git a/tox.ini b/tox.ini index d3fbc7e7..bbebce7c 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ deps = -r{toxinidir}/requirements.txt commands = nosetests [testenv:pep8] -commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc reddwarfclient tests setup.py +commands = flake8 [testenv:venv] commands = {posargs} @@ -30,3 +30,8 @@ commands = nosetests --cover-erase --cover-package=reddwarfclient --with-xcovera sphinx -commands = sphinx-build -b html {toxinidir}/docs/source {envtmpdir}/html + +[flake8] +ignore = E12,F,H +show-source = True +exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build