提交 b42b7b0c 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!18 Fix pylint issues reported at 7, April

Merge pull request !18 from 李鸿章/fix_pylint
......@@ -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')
......
......@@ -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):
......
......@@ -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):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册