paleolimbot commented on code in PR #469:
URL: https://github.com/apache/sedona-db/pull/469#discussion_r2654690195
##########
python/sedonadb/tests/functions/test_functions.py:
##########
@@ -119,6 +119,49 @@ def test_st_astext(eng, geom):
eng.assert_query_result(f"SELECT ST_AsText({geom_or_null(geom)})",
expected)
[email protected]("eng", [SedonaDB, PostGIS])
[email protected](
+ ("geom", "expected"),
+ [
+ (None, None),
+ ("LINESTRING EMPTY", '{"type":"LineString","coordinates":[]}'),
+ ("POLYGON EMPTY", '{"type":"Polygon","coordinates":[[]]}'),
+ ("MULTIPOINT EMPTY", '{"type":"MultiPoint","coordinates":[]}'),
+ ("MULTILINESTRING EMPTY",
'{"type":"MultiLineString","coordinates":[]}'),
+ ("MULTIPOLYGON EMPTY", '{"type":"MultiPolygon","coordinates":[]}'),
+ ("GEOMETRYCOLLECTION EMPTY",
'{"type":"GeometryCollection","geometries":[]}'),
+ ("POINT (1 2)", '{"type":"Point","coordinates":[1.0,2.0]}'),
+ (
+ "LINESTRING (0 0, 1 1)",
+ '{"type":"LineString","coordinates":[[0.0,0.0],[1.0,1.0]]}',
+ ),
Review Comment:
Alternatively, just add `0.5` to all of your coordinates (maybe add a
comment with a link tp https://github.com/apache/sedona-db/issues/472 or a link
to this PR and a short explanation of why you aren't using any integer
coordinates in your test data given that all the other tests do).
--
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]