unittest.assertRaise and keyword arguments?

Bo Peng bpeng at rice.edu
Fri Dec 2 20:34:08 CET 2005


Dear list,

The syntax for using assertRaise is

   assertRaise(exception, function, para1, para2,...)

However, I have a long list of arguments (>20) so I would like to test 
some of them using keyword arguments (use default for others). Is there 
a way to do this except for manually try...except?

Thanks.
Bo



More information about the Python-list mailing list