@@ -0,0 +1,715 @@
+from __future__ import unicode_literals%0A%0Aimport pickle%0A%0Afrom ...language import Language%0A%0A%0Adef test_pickle_single_doc():%0A    nlp = Language()%0A    doc = nlp(u'pickle roundtrip')%0A    data = pickle.dumps(doc, 1)%0A    doc2 = pickle.loads(data)%0A    assert doc2.text == 'pickle roundtrip'%0A%0A%0Adef test_list_of_docs_pickles_efficiently():%0A    nlp = Language()%0A    one_pickled = pickle.dumps(nlp(u'0'), -1)%0A    docs = list(nlp.pipe(str(i) for i in range(100)))%0A    many_pickled = pickle.dumps(docs, -1)%0A    assert len(many_pickled) %3C (len(one_pickled) * 2)%0A    many_unpickled = pickle.loads(many_pickled)%0A    assert many_unpickled%5B0%5D.text == '0'%0A    assert many_unpickled%5B-1%5D.text == '99'%0A    assert len(many_unpickled) == 99%0A

Add tests for pickling doc