Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
havok2063 committed Feb 4, 2025
1 parent afa9c80 commit 10e2f7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/tools/test_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_map(self, map_, galaxy):
def test_plot(self, map_):
fig, ax = map_.plot()
assert isinstance(fig, matplotlib.figure.Figure)
assert isinstance(ax, matplotlib.axes._subplots.Subplot)
assert isinstance(ax, matplotlib.axes.Axes)
assert 'Make single panel map or one panel of multi-panel map plot.' in map_.plot.__doc__

@marvin_test_if(mark='skip', map_={'data_origin': ['db']})
Expand Down
6 changes: 5 additions & 1 deletion tests/tools/test_spaxel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import astropy.io.fits
import pytest

from astropy import units as u
from marvin import config
from marvin.core.exceptions import MarvinDeprecationError, MarvinError
from tests import marvin_test_if, marvin_test_if_class
Expand Down Expand Up @@ -662,7 +663,10 @@ def test_values(self, galaxy, exporigin):

assert map[yy, xx].value == pytest.approx(channel_data['value'], abs=2.e-4)
assert map.unit.scale == 1e-17
assert map.unit.to_string() == channel_data['unit']
spax = u.def_unit('spaxel')
u.add_enabled_units(spax)
uu = u.Unit(channel_data['unit'])
assert map.unit.to_string() == uu.to_string()

assert map[yy, xx].mask == pytest.approx(channel_data['mask'], abs=2.e-4)
assert map[yy, xx].ivar == pytest.approx(channel_data['ivar'], abs=2.e-4)
Expand Down

0 comments on commit 10e2f7b

Please sign in to comment.