Fix class to pickling works as expected

This commit is contained in:
Ines Montani 2020-07-06 16:43:45 +02:00
parent 5b7b2a498d
commit b6deef80f8
1 changed files with 23 additions and 23 deletions

View File

@ -244,10 +244,6 @@ def test_issue4849():
assert count_ents == 2 assert count_ents == 2
def test_issue4903():
"""Ensure that this runs correctly and doesn't hang or crash on Windows /
macOS."""
class CustomPipe: class CustomPipe:
name = "my_pipe" name = "my_pipe"
@ -270,6 +266,10 @@ def test_issue4903():
def _get_my_ext(span): def _get_my_ext(span):
return str(span.end) return str(span.end)
def test_issue4903():
"""Ensure that this runs correctly and doesn't hang or crash on Windows /
macOS."""
nlp = English() nlp = English()
custom_component = CustomPipe() custom_component = CustomPipe()
nlp.add_pipe(nlp.create_pipe("sentencizer")) nlp.add_pipe(nlp.create_pipe("sentencizer"))