mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Add test for stray print statements in languages (see #3342)
This commit is contained in:
parent
48a2046d1c
commit
533b580c19
|
@ -16,6 +16,10 @@ LANGUAGES = ["af", "ar", "bg", "bn", "ca", "cs", "da", "de", "el", "en", "es",
|
|||
|
||||
|
||||
@pytest.mark.parametrize("lang", LANGUAGES)
|
||||
def test_lang_initialize(lang):
|
||||
def test_lang_initialize(lang, capfd):
|
||||
"""Test that languages can be initialized."""
|
||||
lang_cls = get_lang_class(lang)() # noqa: F841
|
||||
nlp = get_lang_class(lang)() # noqa: F841
|
||||
# Check for stray print statements (see #3342)
|
||||
doc = nlp("test")
|
||||
captured = capfd.readouterr()
|
||||
assert not captured.out
|
||||
|
|
Loading…
Reference in New Issue
Block a user