def load(filename): handler = ServerLifecycleHandler(filename=filename) result['handler'] = handler
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)
def load(filename): handler = result['handler'] = ServerLifecycleHandler( filename=filename) if handler.failed: raise RuntimeError(handler.error)
def test_missing_filename_raises(): with pytest.raises(ValueError): ServerLifecycleHandler()