<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
'''
&gt;&gt;&gt; from aligned_class_ext import *

Ensure sanity:

    &gt;&gt;&gt; x = X(42, 16)
    &gt;&gt;&gt; x_function(x)
    42
    &gt;&gt;&gt; f_function(x)
    16.0

Demonstrate extraction in the presence of metaclass changes:

    &gt;&gt;&gt; class MetaX(X.__class__):
    ...     def __new__(cls, *args):
    ...         return super(MetaX, cls).__new__(cls, *args)
    &gt;&gt;&gt; class XPlusMetatype(X):
    ...     __metaclass__ = MetaX
    &gt;&gt;&gt; x = XPlusMetatype(42, 16)
    &gt;&gt;&gt; x_function(x)
    42
    &gt;&gt;&gt; f_function(x)
    16.0


'''

def run(args = None):
    import sys
    import doctest

    if args is not None:
        sys.argv = args
    return doctest.testmod(sys.modules.get(__name__))

if __name__ == '__main__':
    print("running...")
    import sys
    status = run()[0]
    if (status == 0): print("Done.")
    sys.exit(status)
</pre></body></html>