(tmp_path: pathlib.Path, schema: dict, expected_errors: list)
| 102 | ], |
| 103 | ) |
| 104 | def test_bad_schema(tmp_path: pathlib.Path, schema: dict, expected_errors: list): |
| 105 | doc_file = tmp_path / "forms.yaml" |
| 106 | with doc_file.open("wt") as fo: |
| 107 | yaml.dump(schema, fo) |
| 108 | with pytest.raises(ValidationError) as exc: |
| 109 | validate_doc(doc_file) |
| 110 | |
| 111 | def del_url(d): |
| 112 | del d["url"] |
| 113 | return d |
| 114 | |
| 115 | assert list(map(del_url, exc.value.errors())) == expected_errors |
| 116 | |
| 117 | |
| 118 | def test_validate_cmd(tmp_path: pathlib.Path, cli_runner: CliRunner): |
nothing calls this directly
no test coverage detected