Skip to content

Commit

Permalink
test: unify naming in optional dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Calychas committed Apr 24, 2023
1 parent 3470760 commit 01089b3
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions tests/miscellaneous/test_optional_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,14 @@ def _test_voronoi() -> None:
VoronoiRegionizer(seeds=seeds_gdf)


def _test_plotting_folium_module() -> None:
from srai.plotting import folium_wrapper
def _test_plotting() -> None:
from srai.plotting import folium_wrapper, plotly_wrapper # noqa: F401

folium_wrapper.plot_regions(_get_regions_gdf())


def _test_plotting_plotly_module() -> None:
from srai.plotting import plotly_wrapper

plotly_wrapper.plot_regions(_get_regions_gdf(), return_plot=True)


def _test_torch_lightning_embedders() -> None:
def _test_torch() -> None:
from srai.embedders import GTFS2VecEmbedder, Highway2VecEmbedder

Highway2VecEmbedder()
Expand Down Expand Up @@ -139,9 +134,8 @@ def _get_regions_gdf() -> gpd.GeoDataFrame:
"test_fn",
[
(_test_voronoi),
(_test_plotting_folium_module),
(_test_plotting_plotly_module),
(_test_torch_lightning_embedders),
(_test_plotting),
(_test_torch),
(_test_osm),
(_test_gtfs),
],
Expand All @@ -156,9 +150,8 @@ def test_optional_available(test_fn):
"test_fn",
[
(_test_voronoi),
(_test_plotting_folium_module),
(_test_plotting_plotly_module),
(_test_torch_lightning_embedders),
(_test_plotting),
(_test_torch),
(_test_osm),
(_test_gtfs),
],
Expand Down

0 comments on commit 01089b3

Please sign in to comment.