diff options
author | Kui Shi <skuicloud@gmail.com> | 2013-10-04 16:54:03 +0800 |
---|---|---|
committer | Kui Shi <skuicloud@gmail.com> | 2013-10-04 16:54:03 +0800 |
commit | 8a036c3f76f0d0ae4cb4c57f902a5e6b90baa9c9 (patch) | |
tree | bbbc8e1879d9c946b7c2b5bb2cad2139188e4718 /tox.ini | |
parent | 0341f933caf91a522dffe42a5092c1e4a7925adb (diff) | |
download | python-keystoneclient-8a036c3f76f0d0ae4cb4c57f902a5e6b90baa9c9.tar.gz |
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
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -27,9 +27,8 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' downloadcache = ~/cache/pip [flake8] -# H202: assertRaises Exception too broad # F821: undefined name # H304: no relative imports -ignore = F821,H202,H304 +ignore = F821,H304 show-source = True exclude = .venv,.tox,dist,doc,*egg,build |