Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Fail unless an exception of class excClass is raised
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
raised, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.

If called with callableObj omitted or None, will return a
context object used like this::
(more...)

src/p/y/pystat-0.2.4/pystat/tests/test_plain_counter.py   pystat(Download)
    def test_overflow(self):
        c = PlainCounter()
        c.load(11111111111111111111)
        with self.assertRaises(OverflowError):
            len(c)