From 4c5f51e49ed5bfa12e0c784457c46f8d0e1cb041 Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 13 Mar 2017 15:16:11 +0100 Subject: [PATCH] Update regression test --- spacy/tests/regression/test_issue636.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 spacy/tests/regression/test_issue636.py diff --git a/spacy/tests/regression/test_issue636.py b/spacy/tests/regression/test_issue636.py new file mode 100644 index 000000000..61dd896f8 --- /dev/null +++ b/spacy/tests/regression/test_issue636.py @@ -0,0 +1,16 @@ +# coding: utf8 +from __future__ import unicode_literals + +from ...tokens.doc import Doc +import pytest + + +@pytest.mark.xfail +@pytest.mark.models +@pytest.mark.parametrize('text', ["I cant do this."]) +def test_issue636(EN, text): + """Test that to_bytes and from_bytes don't change the token lemma.""" + doc1 = EN(text) + doc2 = Doc(EN.vocab) + doc2.from_bytes(doc1.to_bytes()) + assert doc1[2].lemma_ == doc2[2].lemma_