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