#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # """Expecting exceptions """ #end_pymotw_header def this_raises(): """This function always raises an exception. >>> this_raises() Traceback (most recent call last): RuntimeError: here is the error """ raise RuntimeError('here is the error')