In article <mailman.1991.1306191316.9059.python-l...@python.org>,
 Ian Kelly <ian.g.ke...@gmail.com> 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