Skip to content

Commit

Permalink
Avoid / silence warnings in refactored tests (#7905)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Aug 30, 2023
1 parent 25ec3f2 commit a2189d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_transforms_v2_refactored.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def test_float16_no_rounding(self):
# Non-regression test for https://github.com/pytorch/vision/issues/7667

input = make_image_tensor(self.INPUT_SIZE, dtype=torch.float16)
output = F.resize_image(input, size=self.OUTPUT_SIZES[0])
output = F.resize_image(input, size=self.OUTPUT_SIZES[0], antialias=True)

assert output.dtype is torch.float16
assert (output.round() - output).abs().sum() > 0
Expand Down Expand Up @@ -1375,6 +1375,7 @@ def test_transform_noop(self, make_input, device):
assert_equal(output, input)


@pytest.mark.filterwarnings("ignore:The provided center argument has no effect")
class TestRotate:
_EXHAUSTIVE_TYPE_AFFINE_KWARGS = dict(
# float, int
Expand Down

0 comments on commit a2189d6

Please sign in to comment.