mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 09:56:28 +03:00
Test with default value
This commit is contained in:
parent
1c60f0b5e9
commit
f2352eb701
|
@ -60,10 +60,10 @@ def test_initialize_arguments():
|
||||||
assert errors[0]["type"] == "value_error.strictbool"
|
assert errors[0]["type"] == "value_error.strictbool"
|
||||||
init_cfg = {
|
init_cfg = {
|
||||||
"tokenizer": {"custom": 1},
|
"tokenizer": {"custom": 1},
|
||||||
"components": {name: {"custom1": "x", "custom2": True}},
|
"components": {name: {"custom1": "x"}},
|
||||||
}
|
}
|
||||||
nlp.config["initialize"].update(init_cfg)
|
nlp.config["initialize"].update(init_cfg)
|
||||||
nlp.initialize(get_examples)
|
nlp.initialize(get_examples)
|
||||||
assert nlp.tokenizer.from_initialize == 1
|
assert nlp.tokenizer.from_initialize == 1
|
||||||
pipe = nlp.get_pipe(name)
|
pipe = nlp.get_pipe(name)
|
||||||
assert pipe.from_initialize == ("x", True)
|
assert pipe.from_initialize == ("x", False)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user