From a060ed21e87d9c9820ca1c74dd84b97bebffc4ad Mon Sep 17 00:00:00 2001 From: Paul O'Leary McCann Date: Wed, 25 Jan 2023 19:59:38 +0900 Subject: [PATCH] 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. --- spacy/tests/test_cli_app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacy/tests/test_cli_app.py b/spacy/tests/test_cli_app.py index 3838b3406..cc97922a2 100644 --- a/spacy/tests/test_cli_app.py +++ b/spacy/tests/test_cli_app.py @@ -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, ]