MCPcopy Create free account
hub / github.com/DeepL/deepl-python / test_document_output_format

Function test_document_output_format

tests/test_translate_document.py:171–186  ·  view source on GitHub ↗
(
    translator,
    example_document_path,
    output_dir_path,
)

Source from the content-addressed store, hash-verified

169
170@needs_mock_server
171def 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
189def test_document_failure_during_translation(

Callers

nothing calls this directly

Tested by

no test coverage detected