def instantiate_actor(self, actorclass, actorname):
        try:
            actor = actorclass(actorname, disable_state_checks=True)
            if not hasattr(actor, 'test_set'):
                self.actors[actorname] = 'no_test'
                return
            actor._calvinsys = CalvinSysMock()
            actor._calvinsys['file'] = CalvinSysFileMock()
            actor._calvinsys['timer'] = CalvinSysTimerMock()
            actor.init(*actorclass.test_args, **actorclass.test_kwargs)
            actor.setup_complete()
        except Exception as e:
            self.illegal_actors[actorname] = "Failed to instantiate"
            sys.stderr.write("Actor %s: %s" % (actorname, e))
            import traceback
            sys.stderr.write(''.join(traceback.format_exc()))
            raise e

        for inport in actor.inports.values():
            inport.endpoint = DummyInEndpoint(inport)
        for outport in actor.outports.values():
            outport.fifo.add_reader(actor.id)

        self.actors[actorname] = actor
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/actorstore/tests/test_actors.py/ActorTester.instantiate_actor/original