From 77cc4c53ab7aa5e65f80e5549faafe30d0dca91d Mon Sep 17 00:00:00 2001 From: kinaryml Date: Tue, 8 Nov 2022 11:26:02 -0800 Subject: [PATCH] Updated the 'test_create_from_options_fails_with_invalid_model_path' test case --- mediapipe/tasks/python/test/vision/hand_landmarker_test.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mediapipe/tasks/python/test/vision/hand_landmarker_test.py b/mediapipe/tasks/python/test/vision/hand_landmarker_test.py index b387267a2..7e364556a 100644 --- a/mediapipe/tasks/python/test/vision/hand_landmarker_test.py +++ b/mediapipe/tasks/python/test/vision/hand_landmarker_test.py @@ -135,10 +135,9 @@ class HandLandmarkerTest(parameterized.TestCase): def test_create_from_options_fails_with_invalid_model_path(self): # Invalid empty model path. with self.assertRaisesRegex( - ValueError, - r"ExternalFile must specify at least one of 'file_content', " - r"'file_name', 'file_pointer_meta' or 'file_descriptor_meta'."): - base_options = _BaseOptions(model_asset_path='') + RuntimeError, 'Unable to open file at /path/to/invalid/model.tflite'): + base_options = _BaseOptions( + model_asset_path='/path/to/invalid/model.tflite') options = _HandLandmarkerOptions(base_options=base_options) _HandLandmarker.create_from_options(options)