Skip to content

Commit

Permalink
test: add almmost_equal assert
Browse files Browse the repository at this point in the history
  • Loading branch information
CatStark committed Sep 30, 2020
1 parent 04e1de6 commit ee710ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Binary file added tests/unit/flow/flow.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions tests/unit/flow/test_flow_visualization.py
@@ -1,4 +1,6 @@
import os
import numpy as np

from PIL import Image
from jina.flow import Flow

Expand All @@ -14,3 +16,4 @@ def test_visualization():
flow_original = Image.open(os.path.join(cur_dir, 'flow_original.jpg'))
flow_created = Image.open(os.path.join(cur_dir, 'flow.jpg'))
assert flow_original.size == flow_created.size
np.testing.assert_array_almost_equal(flow_original, flow_created)

0 comments on commit ee710ec

Please sign in to comment.