예제 #1
0
 def load(filename):
     handler = ServerLifecycleHandler(filename=filename)
     result['handler'] = handler
예제 #2
0
 def load(filename):
     handler = ServerLifecycleHandler(filename=filename)
     handler.modify_document(doc)
     handler.on_server_loaded(None)
     handler.on_server_unloaded(None)
     handler.on_session_created(None)
     handler.on_session_destroyed(None)
     if handler.failed:
         raise RuntimeError(handler.error)
예제 #3
0
 def load(filename):
     handler = ServerLifecycleHandler(filename=filename)
     handler.modify_document(doc)
     handler.on_server_loaded(None)
     handler.on_server_unloaded(None)
     handler.on_session_created(None)
     handler.on_session_destroyed(None)
     if handler.failed:
         raise RuntimeError(handler.error)
예제 #4
0
 def load(filename):
     handler = result['handler'] = ServerLifecycleHandler(
         filename=filename)
     if handler.failed:
         raise RuntimeError(handler.error)
예제 #5
0
def test_missing_filename_raises():
    with pytest.raises(ValueError):
        ServerLifecycleHandler()