Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/python/test/nested.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: 780 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 nested_ext import *
6   
7    >>> X
8    <class 'nested_ext.X'>
9   
10    >>> X.__module__
11    'nested_ext'
12   
13    >>> X.__name__
14    'X'
15   
16    >>> X.Y
17    <class 'nested_ext.Y'>
18   
19    >>> X.Y.__module__
20    'nested_ext'
21   
22    >>> X.Y.__name__
23    'Y'
24   
25'''
26
27def run(args = None):
28    import sys
29    import doctest
30
31    if args is not None:
32        sys.argv = args
33    return doctest.testmod(sys.modules.get(__name__))
34   
35if __name__ == '__main__':
36    print "running..."
37    import sys
38    status = run()[0]
39    if (status == 0): print "Done."
40    sys.exit(status)
Note: See TracBrowser for help on using the repository browser.