File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,24 @@ def test_disabled_rule_in_config():
265265 matches = tool .check (text )
266266 assert len (matches ) == 0
267267
268+ def test_special_char_in_text ():
269+ import language_tool_python
270+ tool = language_tool_python .LanguageTool ('en-US' )
271+ text = "The sun was seting π
, casting a warm glow over the park. Birds chirpped softly π¦ as the day slowly fade into night."
272+ assert tool .correct (text ) == "The sun was setting π
, casting a warm glow over the park. Birds chipped softly π¦ as the day slowly fade into night."
273+ tool .close ()
274+
275+ def test_install_inexistent_version ():
276+ import language_tool_python
277+ with pytest .raises (LanguageToolError ):
278+ language_tool_python .LanguageTool (language_tool_download_version = "0.0.0" )
279+
280+ def test_inexistant_language ():
281+ import language_tool_python
282+ with language_tool_python .LanguageTool ("en-US" ) as tool :
283+ with pytest .raises (ValueError ):
284+ language_tool_python .LanguageTag ("xx-XX" , tool ._get_languages ())
285+
268286
269287def test_debug_mode ():
270288 from language_tool_python .server import DEBUG_MODE
You canβt perform that action at this time.
0 commit comments