Skip to content

Commit 18d2312

Browse files
committed
Fix error in test for load_fits
This was not actually testing passing in a file name...it was passing in an HDU.
1 parent bb3b419 commit 18d2312

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/astro_image_display_api/widget_api_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ def test_width_height(self):
7070
assert self.image.image_width == width
7171
assert self.image.image_height == height
7272

73-
def test_load_fits(self, data):
73+
def test_load_fits(self, data, tmp_path):
7474
hdu = fits.PrimaryHDU(data=data)
75-
self.image.load_fits(hdu)
75+
image_path = tmp_path / 'test.fits'
76+
hdu.header["BUNIT"] = "adu"
77+
hdu.writeto(image_path)
78+
self.image.load_fits(image_path)
7679

7780
def test_load_nddata(self, data):
7881
nddata = NDData(data)

0 commit comments

Comments
 (0)