File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
plotly/tests/test_optional/test_px Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -375,3 +375,22 @@ def test_empty_df_int64(backend):
375
375
)
376
376
# to_dict() should not raise an exception
377
377
fig .to_dict ()
378
+
379
+
380
+ @pytest .mark .parametrize ("return_type" , ["pandas" , "polars" , "pyarrow" ])
381
+ def test_load_px_data (return_type ):
382
+ # Test that all px.data functions can be called without error
383
+ data_func_names = [
384
+ f
385
+ for f in dir (px .data )
386
+ if not f .startswith ("_" )
387
+ and callable (getattr (px .data , f ))
388
+ and not f == "import_module"
389
+ ]
390
+ for fname in data_func_names :
391
+ if fname == "election_geojson" :
392
+ # As a geojson file, election_geojson does not support the return_type argument
393
+ df = getattr (px .data , fname )()
394
+ else :
395
+ df = getattr (px .data , fname )(return_type = return_type )
396
+ assert len (df ) > 0
You can’t perform that action at this time.
0 commit comments