Commit 8fe09149 authored by André Anjos's avatar André Anjos 💬
Browse files

Merge branch 'unicode' into 'master'

Unicode

See merge request !8
parents 942d8795 5b8c230f
Pipeline #11699 passed with stages
in 9 minutes and 51 seconds
test.mov
\ No newline at end of file
......@@ -17,6 +17,7 @@ from bob.io.base import load
# These are some global parameters for the test.
INPUT_VIDEO = test_utils.datafile('test.mov', __name__)
UNICODE_VIDEO = test_utils.datafile('test_straße.mov', __name__)
def test_codec_support():
......@@ -87,6 +88,16 @@ def test_video_reader_attributes():
nose.tools.eq_(len(iv.video_type[2]), len(iv.frame_type[2])+1)
assert isinstance(iv.info, str)
def test_video_reader_unicode():
from . import reader
iv = reader(UNICODE_VIDEO)
assert isinstance(iv.filename, str)
assert 'ß' in UNICODE_VIDEO
assert 'ß' in iv.filename
def test_video_reader_str():
from . import reader
......@@ -120,6 +131,16 @@ def test_iteration():
for l, i in zip(objs, f):
assert numpy.allclose(l, i)
def test_base_load_on_unicode():
from . import reader
f = reader(UNICODE_VIDEO)
objs = load(UNICODE_VIDEO)
nose.tools.eq_(len(f), len(objs))
for l, i in zip(objs, f):
assert numpy.allclose(l, i)
def test_indexing():
from . import reader
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment