]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/test/wrapper_held_type.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / python / test / wrapper_held_type.py
1 # Copyright David Abrahams 2005. 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 wrapper_held_type_ext import *
6 >>> d = data()
7 >>> print(d.id())
8 42
9 >>> do_nothing( d )
10 >>> print(d.id())
11 42
12 >>> d = create_data()
13 >>> print(d.id())
14 42
15 >>> do_nothing( d )
16 >>> print(d.id())
17 42
18 '''
19
20 def run(args = None):
21 import sys
22 import doctest
23
24 if args is not None:
25 sys.argv = args
26 return doctest.testmod(sys.modules.get(__name__))
27
28 if __name__ == '__main__':
29 print("running...")
30 import sys
31 status = run()[0]
32 if (status == 0): print("Done.")
33 sys.exit(status)
34