update error type
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
@@ -375,7 +377,7 @@ def test_parse_config_overrides(args, expected):
[["--foo"], ["--x.foo", "bar", "--baz"], ["--x.foo", "bar", "baz"], ["x.foo"]],
)
def test_parse_config_overrides_invalid(args):
- with pytest.raises(SystemExit):
+ with pytest.raises(NoSuchOption):
parse_config_overrides(args)
