mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
add simple unit test
This commit is contained in:
parent
4347e6d39b
commit
712a78b74a
|
@ -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.
|
||||
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue
Block a user