Skip to content

Commit

Permalink
modification in plot tests (plt.clf) and if/else in datasets submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandezfran committed Feb 1, 2024
1 parent eaea3db commit 4e83af7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions galpynostatic/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ def load_dataset(geometry="spherical"):
"""
if geometry not in ("spherical", "cylindrical", "planar"):
raise ValueError(f"{geometry} is not a valid geometry.")

return pd.read_csv(PATH / f"{geometry}.csv")
else:
return pd.read_csv(PATH / f"{geometry}.csv")
2 changes: 2 additions & 0 deletions tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def test_plot_versus_data(
greg.plot.versus_data(
experiment["C_rates"], experiment["soc"], ax=test_ax
)
plt.clf()

# ref plot
ref_ax = fig_ref.subplots()
Expand Down Expand Up @@ -97,6 +98,7 @@ def test_plot_in_render_map(
test_ax = fig_test.subplots()
greg.plot.render_map(ax=test_ax)
greg.plot.in_render_map(experiment["C_rates"], ax=test_ax)
plt.clf()

# ref plot
ref_ax = fig_ref.subplots()
Expand Down

0 comments on commit 4e83af7

Please sign in to comment.