diff --git a/tests/ut/datavisual/processors/test_graph_processor.py b/tests/ut/datavisual/processors/test_graph_processor.py index b6a0d71612eeffe023ae0564cd719fb5674e29c6..884721d8237b08d7167c426b4daeada9c704ff6f 100644 --- a/tests/ut/datavisual/processors/test_graph_processor.py +++ b/tests/ut/datavisual/processors/test_graph_processor.py @@ -105,7 +105,7 @@ class TestGraphProcessor: test_train_id = "not_exist_train_id" with pytest.raises(exceptions.TrainJobNotExistError) as exc_info: GraphProcessor(test_train_id, self._mock_data_manager) - assert "Train job is not exist. Detail: Can not find the train job in data manager." == exc_info.value.message + assert exc_info.value.message == "Train job is not exist. Detail: Can not find the train job in data manager." @pytest.mark.usefixtures('load_graph_record') @patch.object(DataManager, 'get_train_job_by_plugin') diff --git a/tests/ut/datavisual/processors/test_images_processor.py b/tests/ut/datavisual/processors/test_images_processor.py index d1e0f7a6576563093c3f85a984ea48840fc0594c..ced4020ba5751858c332b733ee47cbc894376d84 100644 --- a/tests/ut/datavisual/processors/test_images_processor.py +++ b/tests/ut/datavisual/processors/test_images_processor.py @@ -30,7 +30,6 @@ from mindinsight.datavisual.data_transform import data_manager from mindinsight.datavisual.data_transform.loader_generators.data_loader_generator import DataLoaderGenerator from mindinsight.datavisual.processors.images_processor import ImageProcessor from mindinsight.datavisual.utils import crc32 -from mindinsight.utils.exceptions import ParamValueError from ....utils.log_operations import LogOperations from ....utils.tools import check_loading_done, delete_files_or_dirs, get_image_tensor_from_bytes @@ -113,7 +112,7 @@ class TestImagesProcessor: image_processor.get_metadata_list(test_train_id, self._tag_name) assert exc_info.value.error_code == '50545005' - assert "Train job is not exist. Detail: Can not find the given train job in cache." == exc_info.value.message + assert exc_info.value.message == "Train job is not exist. Detail: Can not find the given train job in cache." @pytest.mark.usefixtures('load_image_record') def test_get_metadata_list_with_not_exist_tag(self): @@ -150,7 +149,7 @@ class TestImagesProcessor: image_processor.get_single_image(test_train_id, test_tag_name, test_step) assert exc_info.value.error_code == '50545005' - assert "Train job is not exist. Detail: Can not find the given train job in cache." == exc_info.value.message + assert exc_info.value.message == "Train job is not exist. Detail: Can not find the given train job in cache." @pytest.mark.usefixtures('load_image_record') def test_get_single_image_with_not_exist_tag(self): @@ -178,8 +177,8 @@ class TestImagesProcessor: image_processor.get_single_image(self._train_id, test_tag_name, test_step) assert exc_info.value.error_code == '5054500D' - assert "Image is not exist. " \ - "Detail: Can not find the step with given train job id and tag." == exc_info.value.message + assert exc_info.value.message == "Image is not exist. " \ + "Detail: Can not find the step with given train job id and tag." @pytest.mark.usefixtures('load_image_record') def test_get_single_image_success(self): diff --git a/tests/ut/datavisual/processors/test_scalars_processor.py b/tests/ut/datavisual/processors/test_scalars_processor.py index 704d83fa4b34805457c23ff7d4d95714aeee7e6b..6c75a4f8a518ebbe778977dd0d898ba18f560321 100644 --- a/tests/ut/datavisual/processors/test_scalars_processor.py +++ b/tests/ut/datavisual/processors/test_scalars_processor.py @@ -89,7 +89,7 @@ class TestScalarsProcessor: scalar_processor.get_metadata_list(test_train_id, self._tag_name) assert exc_info.value.error_code == '50545005' - assert "Train job is not exist. Detail: Can not find the given train job in cache." == exc_info.value.message + assert exc_info.value.message == "Train job is not exist. Detail: Can not find the given train job in cache." @pytest.mark.usefixtures('load_scalar_record') def test_get_metadata_list_with_not_exist_tag(self):