* Fix formatting on serializer tests

This commit is contained in:
Matthew Honnibal 2016-05-02 16:07:21 +02:00
parent 6e1f1c4b9e
commit c1c11a8ae0

View File

@ -14,7 +14,6 @@ def equal(doc1, doc2):
# parse # parse
assert [ t.head.i for t in doc1 ] == [ t.head.i for t in doc2 ] assert [ t.head.i for t in doc1 ] == [ t.head.i for t in doc2 ]
assert [ t.dep for t in doc1 ] == [ t.dep for t in doc2 ] assert [ t.dep for t in doc1 ] == [ t.dep for t in doc2 ]
if doc1.is_parsed and doc2.is_parsed: if doc1.is_parsed and doc2.is_parsed:
assert [ s for s in doc1.sents ] == [ s for s in doc2.sents ] assert [ s for s in doc1.sents ] == [ s for s in doc2.sents ]
@ -35,7 +34,6 @@ def test_serialize_tokens(EN):
@pytest.mark.models @pytest.mark.models
def test_serialize_tokens_tags(EN): def test_serialize_tokens_tags(EN):
doc1 = EN(u'This is a test sentence.',tag=True, parse=False, entity=False) doc1 = EN(u'This is a test sentence.',tag=True, parse=False, entity=False)
doc2 = Doc(EN.vocab).from_bytes(doc1.to_bytes()) doc2 = Doc(EN.vocab).from_bytes(doc1.to_bytes())
equal(doc1, doc2) equal(doc1, doc2)
@ -58,7 +56,7 @@ def test_serialize_tokens_ner(EN):
@pytest.mark.models @pytest.mark.models
def test_serialize_tokens_tags_parse(EN): def test_serialize_tokens_tags_parse(EN):
doc1 = EN(u'This is a test sentence.',tag=True,parse=True,entity=True) doc1 = EN(u'This is a test sentence.', tag=True, parse=True, entity=False)
doc2 = Doc(EN.vocab).from_bytes(doc1.to_bytes()) doc2 = Doc(EN.vocab).from_bytes(doc1.to_bytes())
equal(doc1, doc2) equal(doc1, doc2)