Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/python/test/implicit.py @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 691 bytes
Line 
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 implicit_ext import *
6>>> x_value(X(42))
742
8>>> x_value(42)
942
10>>> x = make_x(X(42))
11>>> x.value()
1242
13>>> try: make_x('fool')
14... except TypeError: pass
15... else: print 'no error'
16'''
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)
Note: See TracBrowser for help on using the repository browser.