Bo Peng
2005-12-02 20:11:04 UTC
self.assertRaises(ValueError, myfunc, arg1,arg2, arg3, arg4, abc=0, foo=1,
bar="hello")
Well, I though abc=0 would be keyword arguments for assertRaisers andbar="hello")
never tried it!
self.assertRaises(ValueError, lambda: myfunc(arg1,arg2, arg3, arg4, abc=0,
foo=1, bar="hello"))
This is also useful.foo=1, bar="hello"))
I now have nothing to complain against assertTaises. :-)
Bo