spaCy/spacy/tests/regression/test_issue599.py

16 lines
314 B
Python
Raw Normal View History

2017-01-10 18:24:10 +00:00
# coding: utf-8
from __future__ import unicode_literals
from ...tokens import Doc
from ...vocab import Vocab
2017-01-10 18:24:10 +00:00
def test_issue599():
doc = Doc(Vocab())
doc.is_tagged = True
doc.is_parsed = True
bytes_ = doc.to_bytes()
doc2 = Doc(doc.vocab)
doc2.from_bytes(bytes_)
assert doc2.is_parsed