Files
python-keystoneclient/tox.ini
Kui Shi 8a036c3f76 Fix H202 assertRaises Exception
Align the hacking version between test-requirement and global requirement.

The change of H202 detection from 0.6 to 0.7 in hacking is:

-    if logical_line.startswith("self.assertRaises(Exception)"):
+    if logical_line.startswith("self.assertRaises(Exception,"):

then more cases are detected by this change. Fix the exposed H202 error.

There is a special test case:
tests/v3/test_endpoints.py:test_update_invalid_interface

ref = self.new_ref(interface=uuid.uuid4().hex)

this line can not generate proper parameter for self.manager.update,
add a parameter "endpoint" for it, according to the
definition in keystoneclient/v3/endpoints.py:EndpointManager.update.

Otherwise, there will be following error after changing the Exception
to exceptions.ValidationError:
TypeError: update() takes at least 2 arguments (6 given)

Fixes Bug #1220008

Change-Id: I8f7ed7a6eebf8576a6db5fecd86b9d19a15c8d60
2013-10-04 16:54:03 +08:00

35 lines
700 B
INI

[tox]
envlist = py26,py27,py33,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
OS_STDOUT_NOCAPTURE=False
OS_STDERR_NOCAPTURE=False
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --testr-args='{posargs}'
[testenv:pep8]
commands =
flake8
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
[tox:jenkins]
downloadcache = ~/cache/pip
[flake8]
# F821: undefined name
# H304: no relative imports
ignore = F821,H304
show-source = True
exclude = .venv,.tox,dist,doc,*egg,build