@@ -62,7 +62,9 @@ def _generate_coco_inputs(iou_type):
62
62
_coco_segm_input = _generate_coco_inputs ("segm" )
63
63
64
64
65
- @pytest .mark .skipif (_PYCOCOTOOLS_AVAILABLE , reason = "test requires that torchvision=>0.8.0 and pycocotools is installed" )
65
+ @pytest .mark .skipif (
66
+ not _PYCOCOTOOLS_AVAILABLE , reason = "test requires that torchvision=>0.8.0 and pycocotools is installed"
67
+ )
66
68
@pytest .mark .parametrize ("iou_type" , ["bbox" , "segm" ])
67
69
@pytest .mark .parametrize ("backend" , ["pycocotools" , "faster_coco_eval" ])
68
70
def test_tm_to_coco (tmpdir , iou_type , backend ):
@@ -172,7 +174,9 @@ def _compare_against_coco_fn(preds, target, iou_type, iou_thresholds=None, rec_t
172
174
}
173
175
174
176
175
- @pytest .mark .skipif (_PYCOCOTOOLS_AVAILABLE , reason = "test requires that torchvision=>0.8.0 and pycocotools is installed" )
177
+ @pytest .mark .skipif (
178
+ not _PYCOCOTOOLS_AVAILABLE , reason = "test requires that torchvision=>0.8.0 and pycocotools is installed"
179
+ )
176
180
@pytest .mark .parametrize ("iou_type" , ["bbox" , "segm" ])
177
181
@pytest .mark .parametrize ("ddp" , [pytest .param (True , marks = pytest .mark .DDP ), False ])
178
182
@pytest .mark .parametrize ("backend" , ["pycocotools" , "faster_coco_eval" ])
@@ -447,7 +451,9 @@ def _generate_random_segm_input(device, batch_size=2, num_preds_size=10, num_gt_
447
451
return preds , targets
448
452
449
453
450
- @pytest .mark .skipif (_PYCOCOTOOLS_AVAILABLE , reason = "test requires that torchvision=>0.8.0 is installed" )
454
+ @pytest .mark .skipif (
455
+ not _PYCOCOTOOLS_AVAILABLE , reason = "test requires that torchvision=>0.8.0 and pycocotools is installed"
456
+ )
451
457
@pytest .mark .parametrize (
452
458
"backend" ,
453
459
[
0 commit comments