Skip to content

Commit a2189d6

Browse files
authored
Avoid / silence warnings in refactored tests (#7905)
1 parent 25ec3f2 commit a2189d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_transforms_v2_refactored.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ def test_float16_no_rounding(self):
821821
# Non-regression test for https://github.com/pytorch/vision/issues/7667
822822

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

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

13771377

1378+
@pytest.mark.filterwarnings("ignore:The provided center argument has no effect")
13781379
class TestRotate:
13791380
_EXHAUSTIVE_TYPE_AFFINE_KWARGS = dict(
13801381
# float, int

0 commit comments

Comments
 (0)