In article <[email protected]>,
 Ian Kelly <[email protected]> wrote:

> This would work:
> 
> self.assertRaises(TypeError, lambda: self.testListNone[:1])

If you're using the version of unittest from python 2.7, there's an even 
nicer way to write this:

with self.assertRaises(TypeError):
    self.testListNone[:1]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to