Skip to content

Commit

Permalink
test that unicode image paths are processed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
duhaime committed Jun 17, 2018
1 parent 2fb22ef commit 702da85
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_goldberg.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ def test_load_from_file():
assert sig.shape == (648,)


def test_load_from_unicode_path():
try:
path = u'test.jpg'
except NameError:
return
gis = ImageSignature()
sig = gis.generate_signature(path)
assert type(sig) is ndarray
assert sig.shape == (648,)


def test_load_from_stream():
gis = ImageSignature()
with open('test.jpg', 'rb') as f:
Expand Down

0 comments on commit 702da85

Please sign in to comment.