2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 18:12:43 +00:00

restored python test drivers

[SVN r19976]
This commit is contained in:
Dave Abrahams
2003-09-09 02:55:39 +00:00
parent 5cd8cce531
commit 911ba333a2
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
r'''>>> import getting_started1
>>> print getting_started1.greet()
hello, world
>>> number = 11
>>> print number, '*', number, '=', getting_started1.square(number)
11 * 11 = 121
'''
def run(args = None):
if args is not None:
import sys
sys.argv = args
import doctest, test_getting_started1
return doctest.testmod(test_getting_started1)
if __name__ == '__main__':
import sys
sys.exit(run()[0])