From caff4638c986411c2c7b6de0230fd53fa862cad3 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 9 Oct 2015 11:08:12 +0200 Subject: [PATCH] * Fix website/test_api.py for Python 3 --- tests/website/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/website/test_api.py b/tests/website/test_api.py index ef0365d88..c173c2b74 100644 --- a/tests/website/test_api.py +++ b/tests/website/test_api.py @@ -80,7 +80,7 @@ def test_read_bytes(nlp): file_.write(nlp(u'This is a document.').to_bytes()) file_.write(nlp(u'This is another.').to_bytes()) docs = [] - with open(loc) as file_: + with open(loc, 'rb') as file_: for byte_string in Doc.read_bytes(file_): docs.append(Doc(nlp.vocab).from_bytes(byte_string)) assert len(docs) == 2