mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-29 17:33:10 +03:00
Add output arg for assemble and pretrain
Assemble and pretrain require an output argument. This commit adds assemble testing, but not pretrain, as that requires an actual trainable component, which is not currently in the test config.
This commit is contained in:
parent
9912eff0b5
commit
a060ed21e8
|
@ -206,12 +206,14 @@ def noop_config():
|
|||
["debug", "config"],
|
||||
["debug", "data"],
|
||||
["train"],
|
||||
["assemble"],
|
||||
],
|
||||
)
|
||||
def test_multi_code(cmd, code_paths, data_paths, noop_config):
|
||||
# check that it fails without the code arg
|
||||
output = ["."] if cmd[0] in ("pretrain", "assemble") else []
|
||||
cmd = ["python", "-m", "spacy"] + cmd
|
||||
result = subprocess.run([*cmd, str(noop_config), *data_paths])
|
||||
result = subprocess.run([*cmd, str(noop_config), *output, *data_paths])
|
||||
assert result.returncode == 1
|
||||
|
||||
# check that it succeeds with the code arg
|
||||
|
@ -219,6 +221,7 @@ def test_multi_code(cmd, code_paths, data_paths, noop_config):
|
|||
[
|
||||
*cmd,
|
||||
str(noop_config),
|
||||
*output,
|
||||
*data_paths,
|
||||
*code_paths,
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user