Skip to content

Commit

Permalink
test: fix tests that I broke
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray committed Nov 13, 2024
1 parent 12e72dc commit 4d25cf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pyuvdata/beam_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def as_power_beam(

if self.Npols > 1 and (
(include_cross_pols and self.Npols != 4)
or (not include_cross_pols and self.Npols != 4)
or (not include_cross_pols and self.Npols != 2)
):
warnings.warn(
"as_power_beam does not modify cross pols when the beam is"
Expand Down
5 changes: 4 additions & 1 deletion tests/test_beam_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ def test_clone(airy):

@pytest.mark.parametrize("uvbeam", [True, False], ids=["uvbeam", "analytic"])
@pytest.mark.parametrize("allow_mutation", [True, False], ids=["mutate", "nomutate"])
@pytest.mark.parametrize("include_cross_pols", [True, False, None], ids=["incx", "nox"])
@pytest.mark.parametrize(
"include_cross_pols", [True, False, None], ids=["incx", "nox", "xpolnone"]
)
def test_as_power(
uvbeam: bool, allow_mutation: bool, include_cross_pols: bool, gaussian, gaussian_uv
):
Expand Down Expand Up @@ -316,6 +318,7 @@ def test_as_power_noop(airy):
assert intf is intf2

with pytest.warns(UserWarning, match="as_power_beam does not modify cross pols"):
print(intf.Npols)
intf2 = intf.as_power_beam(include_cross_pols=False)
assert intf is intf2

Expand Down

1 comment on commit 4d25cf6

@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: 4d25cf6 Previous: 72dd3bc Ratio
tests/uvdata/test_mwa_corr_fits.py::test_read_mwa 2.493542920735788 iter/sec (stddev: 0.14132320399837958) 7.997555508312163 iter/sec (stddev: 0.031847779135263966) 3.21
tests/uvdata/test_mwa_corr_fits.py::test_van_vleck[cheby=True] 3.651971022871359 iter/sec (stddev: 0.11431602924773307) 10.115029583093587 iter/sec (stddev: 0.010289479599246814) 2.77
tests/uvdata/test_mwa_corr_fits.py::test_van_vleck[cheby=False] 0.05980873875825099 iter/sec (stddev: 2.1732428013974006) 0.13610131863522423 iter/sec (stddev: 0.4555432816545101) 2.28

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

Please sign in to comment.