From 5f3cd4bc8a63a22bf680264ce69ef6e611fd334c Mon Sep 17 00:00:00 2001 From: Garrett 'Karto' Keating Date: Fri, 3 Nov 2023 22:30:49 -0400 Subject: [PATCH] Adding little bit of missing test coverage --- pyuvdata/tests/test_parameter.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pyuvdata/tests/test_parameter.py b/pyuvdata/tests/test_parameter.py index c139f2fad..0a9fa0136 100644 --- a/pyuvdata/tests/test_parameter.py +++ b/pyuvdata/tests/test_parameter.py @@ -397,6 +397,17 @@ def test_location_set_lat_lon_alt_degrees_none(): assert param1.value is None +def test_location_acceptability(): + """Test check_acceptability with LocationParameters""" + val = np.array([0.5, 0.5, 0.5]) + param1 = uvp.LocationParameter("p1", value=val, acceptable_range=[0, 1]) + assert param1.check_acceptability()[0] + + val += 0.5 + param1 = uvp.LocationParameter("p1", value=val, acceptable_range=[0, 1]) + assert not param1.check_acceptability()[0] + + def test_location_acceptable_none(): param1 = uvp.LocationParameter(name="p2", value=1, acceptable_range=None)