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 <[email protected]>
<http://bugs.python.org/issue26611>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com