(model)
| 193 | |
| 194 | @pytest.mark.parametrize(["model"], [pytest.param(T5_TINY), pytest.param(BART_TINY), pytest.param(MBART_TINY)]) |
| 195 | def test_run_eval_bart(model): |
| 196 | input_file_name = Path(tempfile.mkdtemp()) / "utest_input.source" |
| 197 | output_file_name = input_file_name.parent / "utest_output.txt" |
| 198 | assert not output_file_name.exists() |
| 199 | articles = [" New York (CNN)When Liana Barrientos was 23 years old, she got married in Westchester County."] |
| 200 | _dump_articles(input_file_name, articles) |
| 201 | testargs = ["run_eval.py", model, str(input_file_name), str(output_file_name)] # TODO: test score_path |
| 202 | with patch.object(sys, "argv", testargs): |
| 203 | run_generate() |
| 204 | assert Path(output_file_name).exists() |
| 205 | os.remove(Path(output_file_name)) |
| 206 | |
| 207 | |
| 208 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected