From a0fdad36d4f5d139012cdc540266bb836c2ebf41 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Fri, 2 Aug 2019 18:15:29 +0800 Subject: [PATCH] fix(test): fix broken code --- tests/test_onnx_image_encoder.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_onnx_image_encoder.py b/tests/test_onnx_image_encoder.py index 569d6976..ce2b347b 100644 --- a/tests/test_onnx_image_encoder.py +++ b/tests/test_onnx_image_encoder.py @@ -8,7 +8,6 @@ from gnes.preprocessor.image.sliding_window import VanillaSlidingPreprocessor from gnes.proto import gnes_pb2, blob2array - def img_process_for_test(dirname): zipfile_ = zipfile.ZipFile(os.path.join(dirname, 'imgs/test.zip')) all_bytes = [zipfile_.open(v).read() for v in zipfile_.namelist()] @@ -28,8 +27,8 @@ def img_process_for_test(dirname): for img in test_img_copy: preprocessor.apply(img) test_img_all_preprocessor.append([blob2array(chunk.blob) - for img in - + for img in test_img_copy for chunk in img.chunks]) + return test_img_all_preprocessor class TestONNXImageEncoder(unittest.TestCase):