- {impl: python, python: "3.9", ext: gevent, postgres: "postgres:17"}
- {impl: python, python: "3.9", ext: dns, postgres: "postgres:14"}
- - {impl: python, python: "3.9", ext: postgis, postgres: "postgis/postgis"}
+ - {impl: python, python: "3.12", ext: postgis, postgres: "postgis/postgis"}
- {impl: python, python: "3.10", ext: numpy, postgres: "postgres:14"}
- {impl: c, python: "3.11", ext: numpy, postgres: "postgres:15"}
- {impl: c, python: "3.12", ext: gevent, postgres: "postgres:14"}
def test_with_adapter(shapely_conn, obj, fmt_in):
obj = globals()[obj]
with shapely_conn.cursor() as cur:
- cur.execute(f"SELECT pg_typeof(%{fmt_in})", [obj])
+ cur.execute(f"SELECT pg_typeof(%{fmt_in.value})", [obj])
assert cur.fetchone()[0] == "geometry"
with shapely_conn.cursor(binary=fmt_out) as cur:
cur.execute("drop table if exists sample_geoms")
cur.execute("create table sample_geoms(id SERIAL PRIMARY KEY, geom geometry)")
- cur.execute(f"insert into sample_geoms(geom) VALUES(%{fmt_in})", (obj,))
+ cur.execute(f"insert into sample_geoms(geom) VALUES(%{fmt_in.value})", (obj,))
cur.execute("select geom from sample_geoms")
result = cur.fetchone()[0]
assert result == obj