[New-bugs-announce] [issue26611] assertRaises callableObj cannot be used as a keyword with args
Chris Mitchell
report at bugs.python.org
Tue Mar 22 09:38:21 EDT 2016
New submission from Chris Mitchell:
assertRaises has callableObj listed as a keyword, though it is not possible to use it as a keyword when the callableObj takes arguments.
The function definition is:
def assertRaises(self, excClass, callableObj=None, *args, **kwargs):
Therefore, using it with a keyword such as:
self.assertRaises(Exception, callableObj=my_function, args_to_function)
will fail due to passing arguments after a keyword.
----------
components: Tests
messages: 262183
nosy: Chris Mitchell
priority: normal
severity: normal
status: open
title: assertRaises callableObj cannot be used as a keyword with args
type: crash
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26611>
_______________________________________
More information about the New-bugs-announce
mailing list