Skip to content

Commit a335d91

Browse files
authored
fix formatting in test_functional_tensor.py (#7709)
1 parent 1c1cd68 commit a335d91

File tree

1 file changed

+4
-44
lines changed

1 file changed

+4
-44
lines changed

test/test_functional_tensor.py

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -293,24 +293,8 @@ def test_translations(self, device, height, width, dt, t, fn):
293293
(33, (5, -4), 1.0, [0.0, 0.0], [0, 0, 0]),
294294
(45, [-5, 4], 1.2, [0.0, 0.0], (1, 2, 3)),
295295
(33, (-4, -8), 2.0, [0.0, 0.0], [255, 255, 255]),
296-
(
297-
85,
298-
(10, -10),
299-
0.7,
300-
[0.0, 0.0],
301-
[
302-
1,
303-
],
304-
),
305-
(
306-
0,
307-
[0, 0],
308-
1.0,
309-
[
310-
35.0,
311-
],
312-
(2.0,),
313-
),
296+
(85, (10, -10), 0.7, [0.0, 0.0], [1]),
297+
(0, [0, 0], 1.0, [35.0], (2.0,)),
314298
(-25, [0, 0], 1.2, [0.0, 15.0], None),
315299
(-45, [-10, 0], 0.7, [2.0, 5.0], None),
316300
(-45, [-10, -10], 1.2, [4.0, 5.0], None),
@@ -392,19 +376,7 @@ def _get_data_dims_and_points_for_perspective():
392376
@pytest.mark.parametrize("device", cpu_and_cuda())
393377
@pytest.mark.parametrize("dims_and_points", _get_data_dims_and_points_for_perspective())
394378
@pytest.mark.parametrize("dt", [None, torch.float32, torch.float64, torch.float16])
395-
@pytest.mark.parametrize(
396-
"fill",
397-
(
398-
None,
399-
[0, 0, 0],
400-
[1, 2, 3],
401-
[255, 255, 255],
402-
[
403-
1,
404-
],
405-
(2.0,),
406-
),
407-
)
379+
@pytest.mark.parametrize("fill", (None, [0, 0, 0], [1, 2, 3], [255, 255, 255], [1], (2.0,)))
408380
@pytest.mark.parametrize("fn", [F.perspective, torch.jit.script(F.perspective)])
409381
def test_perspective_pil_vs_tensor(device, dims_and_points, dt, fill, fn):
410382

@@ -475,19 +447,7 @@ def test_perspective_interpolation_type():
475447

476448
@pytest.mark.parametrize("device", cpu_and_cuda())
477449
@pytest.mark.parametrize("dt", [None, torch.float32, torch.float64, torch.float16])
478-
@pytest.mark.parametrize(
479-
"size",
480-
[
481-
32,
482-
26,
483-
[
484-
32,
485-
],
486-
[32, 32],
487-
(32, 32),
488-
[26, 35],
489-
],
490-
)
450+
@pytest.mark.parametrize("size", [32, 26, [32], [32, 32], (32, 32), [26, 35]])
491451
@pytest.mark.parametrize("max_size", [None, 34, 40, 1000])
492452
@pytest.mark.parametrize("interpolation", [BILINEAR, BICUBIC, NEAREST, NEAREST_EXACT])
493453
def test_resize(device, dt, size, max_size, interpolation):

0 commit comments

Comments
 (0)