Пример #1
0
def main():
    if sys.argv[1] == "--init":
        print("Initialising Gauge Python project")
        print("create  {}".format(impl_dir))
        shutil.copytree(STEP_IMPL_DIR, impl_dir)
    else:
        s = connection.connect()
        __import__("step_impl.step_impl")
        processor.dispatch_messages(s)
Пример #2
0
def main():
    init(autoreset=True, strip=False)
    print(Style.DIM + "Python: {}".format(platform.python_version()))
    if sys.argv[1] == "--init":
        copy_skel_files()
    else:
        s = connection.connect()
        api.connect_to_api()
        load_impls()
        api.close_api()
        processor.dispatch_messages(s)
Пример #3
0
def start():
    if os.getenv('GAUGE_LSP_GRPC'):
        server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
        p = server.add_insecure_port('127.0.0.1:0')
        handler = lsp_server.LspServerHandler(server)
        lsp_pb2_grpc.add_lspServiceServicer_to_server(handler, server)
        logging.info('Listening on port:{}'.format(p))
        threading.Thread(name="server", target=server.start).start()
        threading.Thread(name="listener",
                         target=handler.wait_till_terminated).start()
    else:
        s = connection.connect()
        processor.dispatch_messages(s)