james-willis commented on code in PR #2167:
URL: https://github.com/apache/sedona/pull/2167#discussion_r2237273790
##########
python/tests/test_path_compatibility.py:
##########
@@ -118,3 +121,30 @@ def test_sql_module_imports(self):
def test_geoarrow_import(self):
# Test create_spatial_dataframe import
assert create_spatial_dataframe is not None
+ assert dataframe_to_arrow is not None
+
+ def test_raster_utils_imports(self):
+ # Test raster utils imports
+ assert SedonaUtils is not None
+
+ def test_import_df_functions_from_sedona_sql(self):
+ # one from each module
+ from sedona.sql import ST_MakePoint, ST_Y, ST_Touches, ST_Envelope_Aggr
+
+ def test_geoarrow_imports(self):
+ from sedona.geoarrow import create_spatial_dataframe,
dataframe_to_arrow
+
+ def test_sedona_util_imports(self):
+ from sedona.utils import KryoSerializer
+ from sedona.utils import SedonaKryoRegistrator
+
+ def test_maps_imports(self):
+ # Test Map imports
+ from sedona.maps import SedonaKepler, SedonaMapUtils, SedonaPyDeck
Review Comment:
I think this testing structure is better.
With those the imports are global so if there is an import error no tests
will run. With the imports scoped locally like this the tests encapsulate what
they are meant to test; the import.
The `is not None` seems redundant to me; if you were able to import it, isnt
it almost certainly `not None`?
--
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]