Skip to content

Commit

Permalink
refactor: Added type hints and docstrings to helper functions. Remove…
Browse files Browse the repository at this point in the history
…d unused helper functions
  • Loading branch information
pabloitu committed Aug 23, 2024
1 parent dd1876b commit b88a590
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions tests/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,36 +724,36 @@ def test_plot_basemap_with_features(self, mock_get_basemap):
self.assertIsInstance(ax, plt.Axes)
mock_get_basemap.assert_not_called()
self.assertTrue(ax.get_legend() is None)

@unittest.skipIf(is_github_ci(), "Skipping test in GitHub CI environment")
@unittest.skipIf(not is_internet_available(), "Skipping test due to no internet connection")
def test_plot_google_satellite(self):
basemap = "google-satellite"
ax = plot_basemap(
basemap=basemap,
extent=self.chiloe_extent,
coastline=True,
tile_depth=4,
show=show_plots,
)
self.assertIsInstance(ax, plt.Axes)
self.assertTrue(ax.get_legend() is None)

@unittest.skipIf(is_github_ci(), "Skipping test in GitHub CI environment")
@unittest.skipIf(not is_internet_available(), "Skipping test due to no internet connection")
def test_plot_esri(self):
basemap = "ESRI_terrain"

ax = plot_basemap(
basemap,
self.chiloe_extent,
coastline=True,
borders=True,
tile_depth=4,
show=show_plots,
)
self.assertIsInstance(ax, plt.Axes)
self.assertTrue(ax.get_legend() is None)
#
# @unittest.skipIf(is_github_ci(), "Skipping test in GitHub CI environment")
# @unittest.skipIf(not is_internet_available(), "Skipping test due to no internet connection")
# def test_plot_google_satellite(self):
# basemap = "google-satellite"
# ax = plot_basemap(
# basemap=basemap,
# extent=self.chiloe_extent,
# coastline=True,
# tile_depth=4,
# show=show_plots,
# )
# self.assertIsInstance(ax, plt.Axes)
# self.assertTrue(ax.get_legend() is None)
#
# @unittest.skipIf(is_github_ci(), "Skipping test in GitHub CI environment")
# @unittest.skipIf(not is_internet_available(), "Skipping test due to no internet connection")
# def test_plot_esri(self):
# basemap = "ESRI_terrain"
#
# ax = plot_basemap(
# basemap,
# self.chiloe_extent,
# coastline=True,
# borders=True,
# tile_depth=4,
# show=show_plots,
# )
# self.assertIsInstance(ax, plt.Axes)
# self.assertTrue(ax.get_legend() is None)

@patch("csep.utils.plots._get_basemap")
def test_plot_basemap_set_global(self, mock_get_basemap):
Expand Down

0 comments on commit b88a590

Please sign in to comment.