##// END OF EJS Templates
Lots of work on exception handling, including tests for traceback printing....
Lots of work on exception handling, including tests for traceback printing. We finally have some tests for various exception mode printing, via doctests that exercise all three modes! Also changed handling of sys.exit(X) to only print the summary message, as SystemExit is most often a 'handled' exception. It can still be 100% silenced via '%run -e', but now it's much less intrusive. Added a new %tb magic to print the last available traceback with the current xmode. One can then re-print the last traceback with more detail if desired, without having to cause it again.

File last commit:

r2415:21955d0e
r2440:0caaf43a
Show More
tclass.py
30 lines | 803 B | text/x-python | PythonLexer
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414 """Simple script to be run *twice*, to check reference counting bugs.
Fernando Perez
Cleanup testing machinery.
r1851
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414 See test_run for details."""
Fernando Perez
Cleanup testing machinery.
r1851
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414 import sys
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414 # We want to ensure that while objects remain available for immediate access,
# objects from *previous* runs of the same script get collected, to avoid
# accumulating massive amounts of old references.
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856 class C(object):
def __init__(self,name):
self.name = name
def __del__(self):
Fernando Perez
- Make ipdoctest a little cleaner by giving it separate option names....
r1910 print 'tclass.py: deleting object:',self.name
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856 try:
name = sys.argv[1]
except IndexError:
pass
else:
Fernando Perez
- Make ipdoctest a little cleaner by giving it separate option names....
r1910 if name.startswith('C'):
c = C(name)
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414
#print >> sys.stderr, "ARGV:", sys.argv # dbg
Fernando Perez
Fix extensions test suite (small, but now it runs and passes!)
r2415
# This next print statement is NOT debugging, we're making the check on a
# completely separate process so we verify by capturing stdout:
Fernando Perez
Massive amount of work to improve the test suite, restores doctests....
r2414 print 'ARGV 1-:', sys.argv[1:]