Improve vacpp support.
[boost.git] / boost / libs / python / test / staticmethod.py
blobcc2fb6a7b33be499e091270e0bbff48f0ebae9e2
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 staticmethod_ext import *
7 >>> class X1(X):
8 ... pass
11 >>> x = X(16)
12 >>> x1 = X1(17)
16 >>> x1.count()
19 >>> x.count()
22 >>> X1.count()
25 >>> X.count()
29 >>> x1.magic()
30 7654321
32 >>> x.magic()
33 7654321
35 >>> X1.magic()
36 7654321
38 >>> X.magic()
39 7654321
42 '''
44 def run(args = None):
45 import sys
46 import doctest
48 if args is not None:
49 sys.argv = args
50 return doctest.testmod(sys.modules.get(__name__))
52 if __name__ == '__main__':
53 print "running..."
54 import sys
55 status = run()[0]
56 if (status == 0): print "Done."
57 sys.exit(status)