paleolimbot commented on issue #819:
URL: https://github.com/apache/sedona-db/issues/819#issuecomment-4391552713

   Some tests that were generated for these functions by an llm that was trying 
to be complete:
   
   ```python
   
   @pytest.mark.parametrize("eng", [SedonaDB, BigQuery])
   @pytest.mark.parametrize(
       ("geog", "expected"),
       [
           pytest.param(None, None, id="null"),
           pytest.param("POINT (0 0)", "GEOMETRYCOLLECTION EMPTY", id="point"),
           pytest.param(
               "MULTIPOINT ((0 0), (1 1))", "GEOMETRYCOLLECTION EMPTY", 
id="multipoint"
           ),
           pytest.param(
               "LINESTRING (0 0, 1 1)",
               "MULTIPOINT (0 0, 1 1)",
               id="linestring",
           ),
           pytest.param(
               "POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))",
               "LINESTRING (0 0, 1 0, 1 1, 0 1, 0 0)",
               id="polygon",
           ),
       ],
   )
   def test_st_boundary(eng, geog, expected):
       eng = eng.create_or_skip()
       eng.assert_query_result(
           f"SELECT ST_Boundary({geog_or_null(geog)})", expected, 
wkt_precision=15
       )
   
   
   # BigQuery doesn't consider the boundary of a closed linestring to be empty
   @pytest.mark.parametrize("eng", [SedonaDB])
   @pytest.mark.parametrize(
       ("geog", "expected"),
       [
           pytest.param(
               "LINESTRING (0 0, 1 1, 0 0)",
               "MULTIPOINT EMPTY",
               id="linestring_closed",
           ),
       ],
   )
   def test_st_boundary_closed_linestring(eng, geog, expected):
       eng = eng.create_or_skip()
       eng.assert_query_result(
           f"SELECT ST_Boundary({geog_or_null(geog)})", expected, 
wkt_precision=4
       )
   ```
   


-- 
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]

Reply via email to