예제 #1
0
def test_get_corrected_text():
    text = AnnotatedText("{helo=>Hello} world!")
    expected = "Hello world!"
    assert text.get_corrected_text() == expected
예제 #2
0
def test_get_corrected_text_with_highlight():
    text = AnnotatedText("{helo=>NO_SUGGESTIONS} world!")
    expected = "helo world!"
    assert text.get_corrected_text() == expected
예제 #3
0
def test_get_corrected_text_on_the_level():
    text = AnnotatedText("{helo=>Hello|hola} {word=>world}!")
    expected = "hola word!"
    assert text.get_corrected_text(level=1) == expected