Esempio n. 1
0
def NewTestSuite(dbsuite):
    """Return a runnable Suite converted from a database TestSuite."""
    if dbsuite.valid:
        return newclass(identifier(dbsuite.name), core.TestSuite)
    else:
        raise InvalidObjectError("%s is not runnable (not valid)." %
                                 (dbsuite, ))
Esempio n. 2
0
def get_class(dtdmod, name, bases):
    try:
        cls = dtdmod._CLASSCACHE[name]
    except KeyError:
        cls = newclass(name, *bases)
        dtdmod._CLASSCACHE[name] = cls
    return cls
Esempio n. 3
0
 def test_newclass(self):
     New = aid.newclass("New", MyBaseClass)
     print(New())
Esempio n. 4
0
 def test_newclass(self):
     New = aid.newclass("New", MyBaseClass)
     print(New())
Esempio n. 5
0
def new_menu():
    doc = XFCE4Menu(xfdesktop_menu)
    RootMenu = newclass("RootMenu", MenuMixin, xfdesktop_menu.Xfdesktop_menu)
    root = RootMenu()
    doc.set_root(root)
    return doc
Esempio n. 6
0
 def add_submenu(self, **attribs):
     Menu = newclass("Menu", MenuMixin, xfdesktop_menu.Menu)
     menu = Menu(**attribs)
     self.append(menu)
     return menu
Esempio n. 7
0
def new_menu():
    doc = XFCE4Menu(xfdesktop_menu)
    RootMenu = newclass("RootMenu", MenuMixin, xfdesktop_menu.Xfdesktop_menu)
    root = RootMenu()
    doc.set_root(root)
    return doc
Esempio n. 8
0
 def add_submenu(self, **attribs):
     Menu = newclass("Menu", MenuMixin, xfdesktop_menu.Menu)
     menu = Menu(**attribs)
     self.append(menu)
     return menu