Skip to content

Commit

Permalink
Adding little bit of missing test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kartographer committed Nov 4, 2023
1 parent 56edd27 commit 5f3cd4b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pyuvdata/tests/test_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 5f3cd4b

Please sign in to comment.