Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(test): fix broken code
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Xiao authored Aug 2, 2019
1 parent e35b31c commit a0fdad3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_onnx_image_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()]
Expand All @@ -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):

Expand Down

0 comments on commit a0fdad3

Please sign in to comment.