]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci(shapely): test shapely with a more current Python version 1033/head
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 26 Mar 2025 14:51:50 +0000 (15:51 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 26 Mar 2025 16:14:27 +0000 (17:14 +0100)
.github/workflows/tests.yml
tests/types/test_shapely.py

index feece0570cb5422dcbbe9c0799f409a050aa6db6..d7224b7d795faa93d31230775bfed5c2b8decdf2 100644 (file)
@@ -40,7 +40,7 @@ jobs:
 
           - {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"}
index a681ffedaeb7c24188d96d546bd0d9704aa7b935..39a41ef6372ca8ab298e9aeb63dd4b114b7b2b52 100644 (file)
@@ -106,7 +106,7 @@ def test_no_info_error(conn):
 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"
 
 
@@ -121,7 +121,7 @@ def test_write_read_shape(shapely_conn, fmt_in, fmt_out, obj, srid):
     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