2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 17:12:22 +00:00
Files
python/test/exception_translator.py
Dave Abrahams fe3cf386c3 Python->C++ exception translation
[SVN r14800]
2002-08-13 00:45:09 +00:00

23 lines
443 B
Python

'''
>>> from exception_translator_ext import *
>>> try:
... throw_error();
... except RuntimeError, x:
... print x
... else:
... print 'Expected a RuntimeError!'
!!!error!!!
'''
def run(args = None):
import sys
import doctest
if args is not None:
sys.argv = args
return doctest.testmod(sys.modules.get(__name__))
if __name__ == '__main__':
print "running..."
import sys
sys.exit(run()[0])