def METHOD_NAME(test, sp, cases):
    for expected_parts, s, allow_escape in cases:
        spans = sp.Split(s, allow_escape)
        if 0:
            print('%r: %s' % (s, spans))
        else:
            # Verbose for debugging
            print(repr(s))
            for span in spans:
                print('  %s %s' % span)
        parts = split._SpansToParts(s, spans)
        print('PARTS %s' % parts)
        test.assertEqual(expected_parts, parts,
                         '%r: %s != %s' % (s, expected_parts, parts))