From c7bf5a5b2feb73e9ff39eb5a2a071d6b2999b299 Mon Sep 17 00:00:00 2001 From: Ricky O'Steen Date: Mon, 4 Dec 2023 10:08:19 -0500 Subject: [PATCH] Fix codestyle --- specutils/tests/test_loaders.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specutils/tests/test_loaders.py b/specutils/tests/test_loaders.py index 56df9b0dc..87bc7f17f 100644 --- a/specutils/tests/test_loaders.py +++ b/specutils/tests/test_loaders.py @@ -593,13 +593,14 @@ def test_tabular_fits_multid(tmp_path, ndim, spectral_axis): assert quantity_allclose(spec.uncertainty.quantity, spectrum.uncertainty.quantity) + @pytest.mark.parametrize("mask_type", [bool, np.uint8, np.int8, np.uint16, np.int16, '>i2']) def test_tabular_fits_mask(tmp_path, mask_type): # test mask I/O with tabular fits format wave = np.arange(3600, 3700) * u.AA nwave = len(wave) - #- 1D Case + # 1D Case flux = np.random.uniform(0,1,size=nwave) * u.Jy mask = np.zeros(flux.shape, dtype=mask_type) mask[0] = 1 @@ -627,7 +628,7 @@ def test_tabular_fits_mask(tmp_path, mask_type): else: assert sp1.mask.dtype == sp2.mask.dtype - #- 2D Case + # 2D Case nspec = 3 flux = np.random.uniform(0,1,size=(nspec,nwave)) * u.Jy mask = np.zeros(flux.shape, dtype=mask_type) @@ -655,6 +656,7 @@ def test_tabular_fits_mask(tmp_path, mask_type): else: assert sp1.mask.dtype == sp2.mask.dtype + def test_tabular_fits_maskheader(tmp_path): # Create a small data set + header with reserved FITS keywords disp = np.linspace(1, 1.2, 21) * u.AA