Skip to content

Commit ea3e8d6

Browse files
committed
add some tests
1 parent 3e1f3c1 commit ea3e8d6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

astropy/modeling/tests/test_models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,12 @@ def test_tabular_interp_1d():
733733
model = LookupTable(points=points, lookup_table=values * u.nJy)
734734
assert_quantity_allclose(model(xnew), ans1)
735735
assert_quantity_allclose(model(xnew.to(u.nm)), ans1)
736-
assert model.bounding_box == (0 * u.nm, 4 * u.nm)
736+
assert model.bounding_box == (0, 4)
737+
738+
model = LookupTable(points=points, lookup_table=values * u.nJy, method="nearest")
739+
assert_quantity_allclose(model(xnew), np.array([1, 10, 10, 2, -3]) * u.nJy)
740+
assert_quantity_allclose(model(xnew.to(u.nm)), np.array([1, 10, 10, 2, -3]) * u.nJy)
741+
assert model.bounding_box == (0, 4)
737742

738743
# Test fill value unit conversion and unitless input on table with unit
739744
model = LookupTable(

0 commit comments

Comments
 (0)