Пример #1
0
 def setup(self):
     EventLoopMixin.setup(self)
     LuaRuntimeMixin.setup(self)
     self.lua_runtime.globals()['Timer'] = Timer
     self.lua_runtime.globals()['event_loop'] = self.loop
     self.lua_runtime.globals()['now'] = timeit.default_timer
     self.lua_runtime.globals()['msec_to_sec'] = msec_to_sec
Пример #2
0
 def teardown(self):
     LuaRuntimeMixin.setup(self)
     EventLoopMixin.setup(self)
Пример #3
0
 def setup(self):
     LuaRuntimeMixin.setup(self)
Пример #4
0
 def setup(self):
     LuaRuntimeMixin.setup(self)
     self._validator = Validator()
     loaded = self._validator.load_schema_from_string(self._xml_schema)
     self.lua_runtime.globals()['Validator'] = self._validator
     assert loaded
Пример #5
0
 def setup(self):
     EventLoopMixin.setup(self)
     LuaRuntimeMixin.setup(self)
     self.lua_runtime.globals()['run_server'] = prepare_server
     self.lua_runtime.globals()['send_message'] = send_get_echo_message