Ejemplo n.º 1
0
def Demo(component):
    engine = Engine(0.001)
    engine.AddPlugin(PrintPlugin(engine))
    #engine.AddPlugin(AutoTerminatePlugin(engine))
    engine.AddComponent(component)
    time.sleep(1.0)
    engine.Start()
Ejemplo n.º 2
0
 def Run(self):
     engine = Engine(0.001, GUI)
     engine.AddComponent(self.component)
     sequences = self.GenerateSequences()
     statics = self.GenerateStatics()
     auto_terminate = AutoTerminatePlugin(engine)
     engine.AddPlugin(auto_terminate)
     component_test = ComponentTestPlugin(engine, sequences, statics)
     engine.AddPlugin(component_test)
     engine.Start()
     if not component_test.test_success:
         self.success = False
         print('=' * 30, self.name, '=' * 30)
         print(self.arguments)
         print(component_test.sequence_moments)
         print(component_test.static_moments)