From 80562bff6d5b5cb8f77b11e59eba67d82ee43061 Mon Sep 17 00:00:00 2001 From: lupeng Date: Mon, 24 Jul 2023 17:47:58 +0800 Subject: [PATCH] add ut for the check --- tests/test_apis/test_inferencers/test_pose2d_inferencer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_apis/test_inferencers/test_pose2d_inferencer.py b/tests/test_apis/test_inferencers/test_pose2d_inferencer.py index b59232efac..be00527ff1 100644 --- a/tests/test_apis/test_inferencers/test_pose2d_inferencer.py +++ b/tests/test_apis/test_inferencers/test_pose2d_inferencer.py @@ -144,6 +144,10 @@ def test_call(self): self.assertSequenceEqual(results1['predictions'][0][0]['keypoints'], results3['predictions'][3][0]['keypoints']) + with self.assertRaises(AssertionError): + for res in inferencer(inputs, vis_out_dir=f'{tmp_dir}/1.jpg'): + pass + # `inputs` is path to a video inputs = 'tests/data/posetrack18/videos/000001_mpiinew_test/' \ '000001_mpiinew_test.mp4'