From fe2a1c3f8a6942aaaf77538816c6cccf6c89d210 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 6db038f943..527dee69f3 100644 --- a/pyuvdata/uvdata/tests/test_uvdata.py +++ b/pyuvdata/uvdata/tests/test_uvdata.py @@ -4213,6 +4213,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])