We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69668fd commit 1328ee8Copy full SHA for 1328ee8
tests/test_translate_text.py
@@ -184,6 +184,17 @@ def test_formality(translator):
184
)
185
186
187
+def test_preserve_formatting(translator):
188
+ # Note: this test may use the mock server that will not translate the text,
189
+ # therefore we do not check the translated result.
190
+ _ = translator.translate_text(
191
+ example_text["EN"], target_lang="DE", preserve_formatting=True
192
+ )
193
194
+ example_text["EN"], target_lang="DE", preserve_formatting=False
195
196
+
197
198
def test_split_sentences_basic(translator):
199
text = """If the implementation is hard to explain, it's a bad idea.
200
If the implementation is easy to explain, it may be a good idea."""
0 commit comments