From 6e6e1229c8c5986604622622fc6f89d5f41971b6 Mon Sep 17 00:00:00 2001 From: Bryna Hazelton Date: Mon, 4 Dec 2023 18:35:53 -0800 Subject: [PATCH] Add test coverage --- pyuvdata/uvdata/tests/test_uvdata.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pyuvdata/uvdata/tests/test_uvdata.py b/pyuvdata/uvdata/tests/test_uvdata.py index 2672142c6d..4672f02748 100644 --- a/pyuvdata/uvdata/tests/test_uvdata.py +++ b/pyuvdata/uvdata/tests/test_uvdata.py @@ -4198,6 +4198,16 @@ def test_check_freq_spacing_flex_spw(sma_mir, chan_width, msg): sma_mir._check_freq_spacing() +def test_check_freq_spacing_single_chan_spw(sma_mir): + sma_mir.flex_spw_id_array[-1] = 5 + spw_list = sma_mir.spw_array.tolist() + spw_list.append(5) + sma_mir.spw_array = np.asarray(spw_list) + spacing_error, chanwidth_error = sma_mir._check_freq_spacing() + assert not spacing_error + assert not chanwidth_error + + @pytest.mark.filterwarnings("ignore:This method will be removed in version 3.0 when") @pytest.mark.filterwarnings("ignore:LST values stored in this file are not ") @pytest.mark.parametrize("future_shapes", [True, False])