diff --git a/spacy/tests/website/test_home.py b/spacy/tests/website/test_home.py index 7797eb639..b54e498f8 100644 --- a/spacy/tests/website/test_home.py +++ b/spacy/tests/website/test_home.py @@ -160,3 +160,15 @@ def test_efficient_binary_serialization(doc): for byte_string in Doc.read_bytes(open('moby_dick.bin', 'rb')): doc = Doc(nlp.vocab) doc.from_bytes(byte_string) + + +@pytest.mark.models +def test_multithreading(nlp): + texts = [ + u'One document.', + u'A second document.', + u'Another document (you should use a generator!).' + ] + for doc in nlp.pipe(texts, batch_size=1000, n_threads=4): + assert doc.is_parsed +