Skip to content

Commit

Permalink
test fig return
Browse files Browse the repository at this point in the history
  • Loading branch information
jrob93 committed Nov 19, 2024
1 parent 40f3356 commit de749fa
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions tests/adler/utilities/test_plotting_utilities.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import pytest
import matplotlib

from adler.dataclasses.AdlerPlanetoid import AdlerPlanetoid
from adler.objectdata.AdlerPlanetoid import AdlerPlanetoid
from adler.utilities.tests_utilities import get_test_data_filepath
import adler.utilities.plotting_utilities as plot_utils
from adler.utilities.plotting_utilities import plot_errorbar

# set up test planetoid object
ssoid = 8268570668335894776
Expand All @@ -14,5 +14,16 @@


def test_plot_errorbar_return(planetoid=test_planetoid, filt_list=["r"]):
fig = plot_utils.plot_errorbar(planetoid, filt_list=filt_list)
assert type(fig) == matplotlib.figure.Figure

# make the fig object
fig = plot_errorbar(planetoid, filt_list=filt_list)
print(isinstance(fig, matplotlib.figure.Figure))

# check that fig is of the correct type
assert isinstance(fig, matplotlib.figure.Figure)


if __name__ == "__main__":
print(test_planetoid.__dict__)

test_plot_errorbar_return()

0 comments on commit de749fa

Please sign in to comment.