mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Merge pull request #5990 from svlandeg/fix/cli-error
This commit is contained in:
commit
96ad472361
|
@ -1,4 +1,6 @@
|
|||
import pytest
|
||||
from click import NoSuchOption
|
||||
|
||||
from spacy.gold import docs_to_json, biluo_tags_from_offsets
|
||||
from spacy.gold.converters import iob2docs, conll_ner2docs, conllu2docs
|
||||
from spacy.lang.en import English
|
||||
|
@ -372,9 +374,18 @@ def test_parse_config_overrides(args, expected):
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
"args",
|
||||
[["--foo"], ["--x.foo", "bar", "--baz"], ["--x.foo", "bar", "baz"], ["x.foo"]],
|
||||
[["--foo"], ["--x.foo", "bar", "--baz"]],
|
||||
)
|
||||
def test_parse_config_overrides_invalid(args):
|
||||
with pytest.raises(NoSuchOption):
|
||||
parse_config_overrides(args)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"args",
|
||||
[["--x.foo", "bar", "baz"], ["x.foo"]],
|
||||
)
|
||||
def test_parse_config_overrides_invalid_2(args):
|
||||
with pytest.raises(SystemExit):
|
||||
parse_config_overrides(args)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user