def app(nbdime_base_url, filespath): """This is a fixture used by the pytest-tornado plugin. It is indirectly called by all tests that use the `gen_test` test mark. """ return init_app( base_url=nbdime_base_url, port=0, cwd=filespath, )
def app(nbdime_base_url, filespath): """This is a fixture used by the pytest-tornado plugin. It is indirectly called by all tests that use the `gen_test` test mark. """ from nbdime.webapp.nbdimeserver import init_app return init_app( base_url=nbdime_base_url, port=0, cwd=filespath, )[0]
def run_server_bg(fbase, fremote, q): asyncio.set_event_loop(asyncio.new_event_loop()) io_loop = ioloop.IOLoop.current(instance=True) app, server = init_app( on_port=lambda port: q.put(port), closable=True, difftool_args=dict(base=fbase, remote=fremote), ) io_loop.start() # After ioloop ends, clean up after server: server.stop() q.put(app.exit_code)
def app(nbdime_base_url, filespath): return init_app( base_url=nbdime_base_url, port=0, cwd=filespath, )