Пример #1
0
def test_is_line_continuation():
    assert not properties.is_line_continuation("")
    assert not properties.is_line_continuation("some text")
    assert properties.is_line_continuation("""some text\\""")
    assert not properties.is_line_continuation("""some text\\\\""")  # Escaped \
    assert properties.is_line_continuation("""some text\\\\\\""")  # Odd num. \ is line continuation
    assert properties.is_line_continuation("""\\\\\\""")
Пример #2
0
def test_is_line_continuation():
    assert not properties.is_line_continuation(u"")
    assert not properties.is_line_continuation(u"some text")
    assert properties.is_line_continuation(u"""some text\\""")
    assert not properties.is_line_continuation(u"""some text\\\\""")  # Escaped \
    assert properties.is_line_continuation(u"""some text\\\\\\""")  # Odd num. \ is line continuation
    assert properties.is_line_continuation(u"""\\\\\\""")
Пример #3
0
def test_is_line_continuation():
    assert properties.is_line_continuation(u"") == False
    assert properties.is_line_continuation(u"some text") == False
    assert properties.is_line_continuation(u"""some text\\""") == True
    assert properties.is_line_continuation(u"""some text\\\\""") == False  # Escaped \
    assert properties.is_line_continuation(u"""some text\\\\\\""") == True  # Odd num. \ is line continuation
    assert properties.is_line_continuation(u"""\\\\\\""") == True
Пример #4
0
def test_is_line_continuation():
    assert properties.is_line_continuation("") == False
    assert properties.is_line_continuation("some text") == False
    assert properties.is_line_continuation("""some text\\""") == True
    assert properties.is_line_continuation("""some text\\\\""") == False  # Escaped \
    assert properties.is_line_continuation("""some text\\\\\\""") == True  # Odd num. \ is line continuation
    assert properties.is_line_continuation("""\\\\\\""") == True