]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/test/aligned_class.py
1 # 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)
5 >>> from aligned_class_ext import *
15 Demonstrate extraction in the presence of metaclass changes:
17 >>> class MetaX(X.__class__):
18 ... def __new__(cls, *args):
19 ... return super(MetaX, cls).__new__(cls, *args)
20 >>> class XPlusMetatype(X):
21 ... __metaclass__ = MetaX
22 >>> x = XPlusMetatype(42, 16)
37 return doctest
.testmod(sys
.modules
.get(__name__
))
39 if __name__
== '__main__':
43 if (status
== 0): print("Done.")