spaCy/spacy/tests/parser/test_parser_pickle.py

18 lines
219 B
Python
Raw Normal View History

import pytest
import pickle
import cloudpickle
2015-10-13 09:20:10 +00:00
import io
@pytest.mark.models
def test_pickle(EN):
2015-10-13 09:20:10 +00:00
file_ = io.BytesIO()
cloudpickle.dump(EN.parser, file_)
file_.seek(0)
loaded = pickle.load(file_)