mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-03 13:14:11 +03:00
* Fix website/test_api.py for Python 3
This commit is contained in:
parent
a510858f5a
commit
caff4638c9
|
@ -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 a document.').to_bytes())
|
||||||
file_.write(nlp(u'This is another.').to_bytes())
|
file_.write(nlp(u'This is another.').to_bytes())
|
||||||
docs = []
|
docs = []
|
||||||
with open(loc) as file_:
|
with open(loc, 'rb') as file_:
|
||||||
for byte_string in Doc.read_bytes(file_):
|
for byte_string in Doc.read_bytes(file_):
|
||||||
docs.append(Doc(nlp.vocab).from_bytes(byte_string))
|
docs.append(Doc(nlp.vocab).from_bytes(byte_string))
|
||||||
assert len(docs) == 2
|
assert len(docs) == 2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user