]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | # Copyright David Abrahams 2004. Distributed under the Boost |
2 | # Software License, Version 1.0. (See accompanying | |
3 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
4 | """ | |
5 | >>> from pytype_function_ext import * | |
6 | ||
7 | >>> print(func.__doc__.splitlines()[1]) | |
8 | func( (A)arg1) -> A : | |
9 | ||
10 | >>> print(func.__module__) | |
11 | pytype_function_ext | |
12 | ||
13 | >>> print(func.__name__) | |
14 | func | |
15 | """ | |
16 | def run(args = None): | |
17 | import sys | |
18 | import doctest | |
19 | ||
20 | if args is not None: | |
21 | sys.argv = args | |
22 | return doctest.testmod(sys.modules.get(__name__)) | |
23 | ||
24 | if __name__ == '__main__': | |
25 | print("running...") | |
26 | import sys | |
27 | status = run()[0] | |
28 | if (status == 0): print("Done.") | |
29 | sys.exit(status) | |
30 | ||
31 | ||
32 |