def test_start_last_line_match():
    target = 'classBackgroundLayer('
    should_match = 'class BackgroundLayer('
    filling = '\n'.join([
        'this is a line',
        'this is another'
        ])
    text = filling + '\n' + should_match
    lines = text.split('\n')
    it = enumerate(lines)

    start_line = get_start_line(it, target)
    assert start_line == 2
    # here next should raise StoptIteration
    StopIteration_raised = False
    try:
        six.next(it)
    except __HOLE__:
        StopIteration_raised = True
    assert StopIteration_raised
dataset/ETHPy150Open los-cocos/cocos/utest/test_uniform_snippet.py/test_start_last_line_match