@@ -184,46 +184,28 @@ def test_formality(translator):
184184 )
185185
186186
187- @needs_real_server
188- class TestSplitSentences :
187+ def test_split_sentences_basic (translator ):
189188 text = """If the implementation is hard to explain, it's a bad idea.
190189 If the implementation is easy to explain, it may be a good idea."""
191190
192- def test_split_sentences_enum_off (self , translator ):
193- translator .translate_text (
194- self .text ,
195- target_lang = "DE" ,
196- split_sentences = deepl .SplitSentences .OFF ,
197- )
198-
199- def test_split_sentences_enum_all (self , translator ):
200- translator .translate_text (
201- self .text ,
202- target_lang = "DE" ,
203- split_sentences = deepl .SplitSentences .ALL ,
204- )
205-
206- def test_split_sentences_enum_no_newlines (self , translator ):
207- translator .translate_text (
208- self .text ,
209- target_lang = "DE" ,
210- split_sentences = deepl .SplitSentences .NO_NEWLINES ,
211- )
212-
213- def test_split_sentences_str_0 (self , translator ):
214- translator .translate_text (
215- self .text , target_lang = "DE" , split_sentences = "0"
216- )
217-
218- def test_split_sentences_str_1 (self , translator ):
219- translator .translate_text (
220- self .text , target_lang = "DE" , split_sentences = "1"
221- )
222-
223- def test_split_sentences_str_no_newlines (self , translator ):
224- translator .translate_text (
225- self .text , target_lang = "DE" , split_sentences = "nonewlines"
226- )
191+ # Note: this test may use the mock server that will not translate the text,
192+ # therefore we do not check the translated result.
193+ _ = translator .translate_text (
194+ text , target_lang = "DE" , split_sentences = deepl .SplitSentences .OFF
195+ )
196+ _ = translator .translate_text (
197+ text , target_lang = "DE" , split_sentences = deepl .SplitSentences .ALL
198+ )
199+ _ = translator .translate_text (
200+ text ,
201+ target_lang = "DE" ,
202+ split_sentences = deepl .SplitSentences .NO_NEWLINES ,
203+ )
204+ _ = translator .translate_text (text , target_lang = "DE" , split_sentences = "0" )
205+ _ = translator .translate_text (text , target_lang = "DE" , split_sentences = "1" )
206+ _ = translator .translate_text (
207+ text , target_lang = "DE" , split_sentences = "nonewlines"
208+ )
227209
228210
229211def test_tag_handling_basic (translator ):
0 commit comments