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

Function test_translate_large_document

tests/test_translate_document.py:119–131  ·  view source on GitHub ↗
(
    translator, example_large_document_path, example_large_document_translation
)

Source from the content-addressed store, hash-verified

117
118@needs_mock_server
119def test_translate_large_document(
120 translator, example_large_document_path, example_large_document_translation
121):
122 with io.BytesIO() as output_file:
123 with open(example_large_document_path, "rb") as input_file:
124 translator.translate_document(
125 input_file, output_file, **default_lang_args
126 )
127
128 assert (
129 example_large_document_translation
130 == output_file.getvalue().decode()
131 )
132
133
134@needs_real_server

Callers

nothing calls this directly

Calls 1

translate_documentMethod · 0.80

Tested by

no test coverage detected