Пример #1
0
def test_filter_text(line_start, line_end, expected_text):

    with mock.patch('meld.meldbuffer.bind_settings', mock.DEFAULT):
        buf = MeldBuffer()
        buf.set_text(text)

        buffer_lines = BufferLines(buf)
        assert buffer_lines[line_start:line_end] == expected_text
Пример #2
0
def test_filter_text(line_start, line_end, expected_text):

    import meld.meldbuffer

    meld.meldbuffer.bind_settings = mock.MagicMock()
    meld.meldbuffer.meldsettings = mock.MagicMock(style_scheme=None)

    buf = MeldBuffer()
    buf.set_text(text)

    buffer_lines = BufferLines(buf)
    assert buffer_lines[line_start:line_end] == expected_text
Пример #3
0
def test_filter_text(line_start, line_end, expected_text):

    import meld.meldbuffer

    meld.meldbuffer.bind_settings = mock.MagicMock()
    meld.meldbuffer.meldsettings = mock.MagicMock(style_scheme=None)

    buf = MeldBuffer()
    buf.set_text(text)

    buffer_lines = BufferLines(buf)
    assert buffer_lines[line_start:line_end] == expected_text
Пример #4
0
def buffer_setup():
    buf = MeldBuffer()
    buf.set_text(text)
    buffer_lines = BufferLines(buf)
    yield buf, buffer_lines