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 committed Oct 31, 2024
1 parent bcf73ec commit d71b4db
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

1 comment on commit d71b4db

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: d71b4db Previous: 72dd3bc Ratio
tests/uvdata/test_mwa_corr_fits.py::test_read_mwa 2.6230099521205616 iter/sec (stddev: 0.08409194691919328) 7.997555508312163 iter/sec (stddev: 0.031847779135263966) 3.05
tests/uvdata/test_mwa_corr_fits.py::test_corr_fits_select_on_read 3.3916976744526233 iter/sec (stddev: 0.10006503328444283) 8.150215609651752 iter/sec (stddev: 0.011753395552105592) 2.40

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.