2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 05:02:17 +00:00
Files
python/test/injected.py
Dave Abrahams 92a77dfe7f Implemented injected constructors.
Eliminated _DEBUG redefinition warning for CWPro8.


[SVN r20126]
2003-09-21 01:35:19 +00:00

26 lines
433 B
Python

'''
>>> from injected_ext import *
>>> X(3,5).value() - (3+5)
0
>>> X(3,5,7).value() - (3*5*7)
0
>>> X().value()
1000
'''
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
status = run()[0]
if (status == 0): print "Done."
sys.exit(status)