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>>> 'importing' 6'importing' 7>>> from raw_ctor_ext import * 8>>> 'imported' 9'imported' 10>>> import sys 11>>> sys.stdout.flush() 12>>> f = Foo(1, 2, 'a', bar = 3, baz = 4) 13>>> f.args 14(1, 2, 'a') 15>>> sorted(f.kw.items()) 16[('bar', 3), ('baz', 4)] 17""" 18def run(args = None): 19 import sys 20 import doctest 21 22 if args is not None: 23 sys.argv = args 24 return doctest.testmod(sys.modules.get(__name__)) 25 26if __name__ == '__main__': 27 print("running...") 28 import sys 29 status = run()[0] 30 if (status == 0): print("Done.") 31 sys.exit(status) 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77