# HG changeset patch # User Paul Boddie # Date 1480954923 -3600 # Node ID 5dc542b8b28b85f76133b7cf189cf0c6e0a3538c # Parent 0867d8924ed94b6d79df90267600782018df9f0d Added tests of instance and class exception raising. diff -r 0867d8924ed9 -r 5dc542b8b28b tests/exceptions.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/exceptions.py Mon Dec 05 17:22:03 2016 +0100 @@ -0,0 +1,13 @@ +# Raise an instance of TypeError. + +try: + raise TypeError() +except TypeError, exc: + print "Handled", exc + +# Raise TypeError, causing instantiation. + +try: + raise TypeError +except TypeError, exc: + print "Handled", exc