add simple unit test

This commit is contained in:
svlandeg 2020-12-30 12:35:26 +01:00
parent 4347e6d39b
commit 712a78b74a
2 changed files with 14 additions and 1 deletions

View File

@ -19,7 +19,7 @@ def info_cli(
# fmt: on
):
"""
Print info about spaCy installation. If a pipeline is speficied as an argument,
Print info about spaCy installation. If a pipeline is specified as an argument,
print its meta information. Flag --markdown prints details in Markdown for easy
copy-pasting to GitHub issues.

View File

@ -13,6 +13,19 @@ import srsly
import os
from .util import make_tempdir
from .. import info
from ..lang.nl import Dutch
def test_cli_info():
nlp = Dutch()
nlp.add_pipe("textcat")
with make_tempdir() as tmp_dir:
nlp.to_disk(tmp_dir)
raw_data = info(tmp_dir, exclude=[""])
assert raw_data["lang"] == "nl"
assert raw_data["components"] == ["textcat"]
assert raw_data["source"] == str(tmp_dir)
def test_cli_converters_conllu_to_docs():