2222geoalchemy2 = pytest .importorskip ("geoalchemy2" )
2323
2424
25- # TODO(http://github.com/googleapis/google-cloud-python/issues/17287): Unskip once bug is resolved.
26- @pytest .mark .skip (reason = "Failing in CI with AssertionError." )
2725def test_geoalchemy2_core (bigquery_dataset ):
2826 """Make sure GeoAlchemy 2 Core Tutorial works as adapted to only having geography
2927
@@ -44,7 +42,7 @@ def test_geoalchemy2_core(bigquery_dataset):
4442
4543 from sqlalchemy import Column , MetaData , String , Table
4644
47- from sqlalchemy_bigquery import GEOGRAPHY
45+ from sqlalchemy_bigquery import GEOGRAPHY , WKT
4846
4947 metadata = MetaData ()
5048 lake_table = Table (
@@ -86,7 +84,7 @@ def test_geoalchemy2_core(bigquery_dataset):
8684
8785 [[result ]] = conn .execute (
8886 select (lake_table .c .name ).where (
89- func .ST_Contains (lake_table .c .geog , "POINT(4 1)" )
87+ func .ST_Contains (lake_table .c .geog , WKT ( "POINT(4 1)" ) )
9088 )
9189 )
9290 assert result == "Orta"
@@ -228,13 +226,13 @@ class Lake(Base):
228226
229227 query = (
230228 session .query (Lake )
231- .filter (Lake .geog .ST_Intersects ("LINESTRING(2 1,4 1)" ))
229+ .filter (Lake .geog .ST_Intersects (WKT ( "LINESTRING(2 1,4 1)" ) ))
232230 .order_by (Lake .name )
233231 )
234232 assert [lake .name for lake in query ] == ["Garde" , "Orta" ]
235233
236234 lake = session .query (Lake ).filter_by (name = "Garde" ).one ()
237- assert session .scalar (lake .geog .ST_Intersects ("LINESTRING(2 1,4 1)" ))
235+ assert session .scalar (lake .geog .ST_Intersects (WKT ( "LINESTRING(2 1,4 1)" ) ))
238236
239237 # Use Other Spatial Functions
240238 query = session .query (Lake .name , func .ST_Area (Lake .geog ).label ("area" )).order_by (
@@ -256,8 +254,6 @@ class Lake(Base):
256254 ]
257255
258256
259- # TODO(http://github.com/googleapis/google-cloud-python/issues/17287): Unskip once bug is resolved.
260- @pytest .mark .skip (reason = "Failing in CI with AssertionError." )
261257def test_geoalchemy2_orm_w_relationship (bigquery_dataset ):
262258 from sqlalchemy import create_engine
263259
0 commit comments