lidavidm commented on issue #2082: URL: https://github.com/apache/arrow-adbc/issues/2082#issuecomment-2620861748
@amoeba since we talked about supporting stdout/stderr, what do you think of this? Initially I had the stdout inline with the prose but decided it broke things up too much so I consolidated it to the end. For testing, I'm thinking I can add a CLI and/or pre-commit check that parses all the recipes and dumps stdout/stderr to text files alongside the source file. That can then be loaded and checked by some test harness. (Saves them from all having to parse the recipe source.) <details> <summary>Recipe source</summary> ```python # RECIPE STARTS HERE #: To connect to a PostgreSQL database, the username and password must #: be provided in the URI. For example, #: #: .. code-block:: text #: #: postgresql://username:password@hostname:port/dbname #: #: See the `PostgreSQL documentation #: <https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING>`_ #: for full details. import os import adbc_driver_postgresql.dbapi uri = os.environ["ADBC_POSTGRESQL_TEST_URI"] conn = adbc_driver_postgresql.dbapi.connect(uri) with conn.cursor() as cur: cur.execute("SELECT 1") print(cur.fetchone()) # STDOUT: (1,) conn.close() ``` </details> <details> <summary>Rendered output</summary>  </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
