(
translator,
example_document_path,
output_dir_path,
)
| 169 | |
| 170 | @needs_mock_server |
| 171 | def test_document_output_format( |
| 172 | translator, |
| 173 | example_document_path, |
| 174 | output_dir_path, |
| 175 | ): |
| 176 | # Mock server supports only TXT and HTML files, so translate TXT->HTML |
| 177 | example_document_path.write_text(example_text["EN"]) |
| 178 | output_document_path = output_dir_path / "example.html" |
| 179 | translator.translate_document_from_filepath( |
| 180 | example_document_path, |
| 181 | output_document_path, |
| 182 | **default_lang_args, |
| 183 | ) |
| 184 | |
| 185 | output = output_document_path.read_text() |
| 186 | assert example_text["DE"] == output |
| 187 | |
| 188 | |
| 189 | def test_document_failure_during_translation( |
nothing calls this directly
no test coverage detected