def pymods():
    if verbose: print "Testing Python subclass of module..."
    log = []
    from types import ModuleType as MT
    class MM(MT):
        def __init__(self, name):
            MT.__init__(self, name)
        def __getattribute__(self, name):
            log.append(("getattr", name))
            return MT.__getattribute__(self, name)
        def __setattr__(self, name, value):
            log.append(("setattr", name, value))
            MT.__setattr__(self, name, value)
        def __delattr__(self, name):
            log.append(("delattr", name))
            MT.__delattr__(self, name)
    a = MM("a")
    a.foo = 12
    x = a.foo
    del a.foo
    vereq(log, [("setattr", "foo", 12),
                ("getattr", "foo"),
                ("delattr", "foo")])

    # http://python.org/sf/1174712
    try:
        class Module(types.ModuleType, str):
            pass
    except __HOLE__:
        pass
    else:
        raise TestFailed("inheriting from ModuleType and str at the "
                          "same time should fail")
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_descr.py/pymods