Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis authored Apr 23, 2024
1 parent fe8795a commit c2efd91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ndcube/tests/test_ndcube.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ def test_wcs_type_after_init(ndcube_3d_ln_lt_l, wcs_3d_l_lt_ln):
def test_rebin(ndcube_3d_l_ln_lt_ectime):
cube = ndcube_3d_l_ln_lt_ectime[:, 1:]
bin_shape = (10, 2, 1)
with pytest.warns(UserWarning, match="The set uncertainty on this NDCube has no known way to propagate forward"):
with pytest.warns(UserWarning, match="The uncertainty on this NDCube has no known way to propagate forward"):
output = cube.rebin(bin_shape, operation=np.sum, propagate_uncertainties=True)
output_sc, output_spec = output.axis_world_coords(wcs=output.wcs)
output_time, = output.axis_world_coords(wcs=output.extra_coords)
Expand Down Expand Up @@ -845,7 +845,7 @@ def test_rebin_no_ec(ndcube_3d_l_ln_lt_ectime):
cube = ndcube_3d_l_ln_lt_ectime[:, 1:]
cube._extra_coords = ExtraCoords(cube)
bin_shape = (10, 2, 1)
with pytest.warns(UserWarning, match="The set uncertainty on this NDCube has no known way to propagate forward"):
with pytest.warns(UserWarning, match="The uncertainty on this NDCube has no known way to propagate forward"):
output = cube.rebin(bin_shape, operation=np.mean, propagate_uncertainties=True)
assert output.extra_coords.is_empty

Expand Down Expand Up @@ -942,7 +942,7 @@ def test_rebin_no_propagate(ndcube_2d_ln_lt_mask_uncert):

cube._mask = False
cube._uncertainty = UnknownUncertainty(cube.data * 0.1)
with pytest.warns(UserWarning, match="The set uncertainty on this NDCube has no known way to propagate forward"):
with pytest.warns(UserWarning, match="The uncertainty on this NDCube has no known way to propagate forward"):
output = cube.rebin(bin_shape, operation=np.sum, propagate_uncertainties=True)
assert output.uncertainty is None

Expand Down

0 comments on commit c2efd91

Please sign in to comment.