Skip to content

Commit

Permalink
test: add test for deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray authored and bhazelton committed Oct 31, 2024
1 parent 7936c9b commit 05ee100
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/uvbeam/test_uvbeam.py
Original file line number Diff line number Diff line change
Expand Up @@ -3261,3 +3261,16 @@ def test_yaml_constructor_errors():
ValueError, match="yaml entries for UVBeam must specify a filename."
):
yaml.safe_load(input_yaml)["beam"]


def test_return_basis_vector_notset(cst_efield_2freq_cut: UVBeam):
"""Test that a deprecation warning is raised if interp is called with defaults."""

with pytest.warns(
DeprecationWarning, match="The default value for `return_basis_vector` is True"
):
_, basis_vector = cst_efield_2freq_cut.interp(
freq_array=cst_efield_2freq_cut.freq_array
)

assert basis_vector is not None

0 comments on commit 05ee100

Please sign in to comment.