diff --git a/tests/pipelines/test_face_2d_keypoints.py b/tests/pipelines/test_face_2d_keypoints.py index 7ccc8a59..875a0e11 100644 --- a/tests/pipelines/test_face_2d_keypoints.py +++ b/tests/pipelines/test_face_2d_keypoints.py @@ -10,7 +10,7 @@ from modelscope.utils.test_utils import test_level class EasyCVFace2DKeypointsPipelineTest(unittest.TestCase): - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip easycv related cases') def test_face_2d_keypoints(self): img_path = 'data/test/images/face_detection.png' model_id = 'damo/cv_mobilenet_face-2d-keypoints_alignment' diff --git a/tests/pipelines/test_face_reconstruction.py b/tests/pipelines/test_face_reconstruction.py index b35482fb..c1de97c0 100644 --- a/tests/pipelines/test_face_reconstruction.py +++ b/tests/pipelines/test_face_reconstruction.py @@ -60,7 +60,7 @@ class FaceReconstructionTest(unittest.TestCase, DemoCompatibilityCheck): Tasks.face_reconstruction, model=model_dir) self.pipeline_inference(face_reconstruction, self.test_image) - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skipUnless(test_level() >= 2, 'skip test in current test level') def test_run_modelhub(self): face_reconstruction = pipeline( Tasks.face_reconstruction, diff --git a/tests/pipelines/test_hand_2d_keypoints.py b/tests/pipelines/test_hand_2d_keypoints.py index 43b569d0..a243a478 100644 --- a/tests/pipelines/test_hand_2d_keypoints.py +++ b/tests/pipelines/test_hand_2d_keypoints.py @@ -23,7 +23,7 @@ class Hand2DKeypointsPipelineTest(unittest.TestCase): self.assertEqual(results[OutputKeys.KEYPOINTS].shape[2], 3) self.assertEqual(results[OutputKeys.BOXES].shape[1], 4) - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip test in current test level: no pipeline implemented') def test_hand_2d_keypoints_with_default_model(self): img_path = 'data/test/images/hand_keypoints.jpg' diff --git a/tests/pipelines/test_hand_detection.py b/tests/pipelines/test_hand_detection.py index 8a6bbd5a..60366287 100644 --- a/tests/pipelines/test_hand_detection.py +++ b/tests/pipelines/test_hand_detection.py @@ -13,7 +13,7 @@ class ObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck): self.task = Tasks.domain_specific_object_detection self.model_id = 'damo/cv_yolox-pai_hand-detection' - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip test in current test level: no pipeline implemented') def test_hand_detection_pipeline(self): test_image = 'data/test/images/hand_detection.jpg' diff --git a/tests/pipelines/test_human_wholebody_keypoint.py b/tests/pipelines/test_human_wholebody_keypoint.py index 7c5946cc..e0052f77 100644 --- a/tests/pipelines/test_human_wholebody_keypoint.py +++ b/tests/pipelines/test_human_wholebody_keypoint.py @@ -11,7 +11,7 @@ from modelscope.utils.test_utils import test_level class EasyCVFace2DKeypointsPipelineTest(unittest.TestCase): - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip easycv related cases') def test_human_wholebody_keypoint(self): img_path = 'data/test/images/keypoints_detect/img_test_wholebody.jpg' model_id = 'damo/cv_hrnetw48_human-wholebody-keypoint_image' diff --git a/tests/pipelines/test_image_panoptic_segmentation.py b/tests/pipelines/test_image_panoptic_segmentation.py index 4f12e6af..ccd9eafd 100644 --- a/tests/pipelines/test_image_panoptic_segmentation.py +++ b/tests/pipelines/test_image_panoptic_segmentation.py @@ -19,7 +19,7 @@ class ImagePanopticSegmentationTest(unittest.TestCase, DemoCompatibilityCheck): self.task = Tasks.image_segmentation self.model_id = 'damo/cv_swinL_panoptic-segmentation_cocopan' - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip test in current test level: no pipeline implemented') def test_image_panoptic_segmentation(self): input_location = 'data/test/images/image_panoptic_segmentation.jpg' pan_segmentor = pipeline(Tasks.image_segmentation, model=self.model_id) @@ -29,7 +29,7 @@ class ImagePanopticSegmentationTest(unittest.TestCase, DemoCompatibilityCheck): cv2.imwrite('result.jpg', draw_img) print('print test_image_panoptic_segmentation return success') - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip test in current test level: no pipeline implemented') def test_image_panoptic_segmentation_from_PIL(self): input_location = 'data/test/images/image_panoptic_segmentation.jpg' pan_segmentor = pipeline(Tasks.image_segmentation, model=self.model_id) diff --git a/tests/pipelines/test_object_detection.py b/tests/pipelines/test_object_detection.py index e4bf6b54..7be6b0f3 100644 --- a/tests/pipelines/test_object_detection.py +++ b/tests/pipelines/test_object_detection.py @@ -47,7 +47,7 @@ class ObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck): def test_demo_compatibility(self): self.compatibility_check() - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip test in current test level: no pipeline implemented') def test_image_object_detection_auto_pipeline(self): model_id = 'damo/cv_yolox_image-object-detection-auto' test_image = 'data/test/images/auto_demo.jpg' @@ -59,7 +59,7 @@ class ObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck): image_object_detection_auto.show_result(test_image, result, 'auto_demo_ret.jpg') - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip test in current test level: no pipeline implemented') def test_image_object_detection_dino_pipeline(self): model_id = 'damo/cv_swinl_image-object-detection_dino' test_image = 'data/test/images/image_detection.jpg' diff --git a/tests/pipelines/test_realtime_object_detection.py b/tests/pipelines/test_realtime_object_detection.py index 498c09d8..76e907a7 100644 --- a/tests/pipelines/test_realtime_object_detection.py +++ b/tests/pipelines/test_realtime_object_detection.py @@ -22,7 +22,7 @@ class RealtimeObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck): self.test_image = 'data/test/images/keypoints_detect/000000438862.jpg' self.task = Tasks.image_object_detection - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip test in current test level: no pipeline implemented') def test_run_easycv_yolox(self): realtime_object_detection = pipeline( Tasks.image_object_detection, model=self.easycv_small_model_id) @@ -34,7 +34,7 @@ class RealtimeObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck): else: raise ValueError('process error') - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skip('skip test in current test level: no pipeline implemented') def test_run_easycv_yolox_nano(self): realtime_object_detection = pipeline( Tasks.image_object_detection, model=self.easycv_nano_model_id)