In article <mailman.1991.1306191316.9059.python-list at python.org>, Ian Kelly <ian.g.kelly at 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]