def test_split_spec(): test_cases = ( # spec, separator, (spec_start, spec_end) ('', ';', ('', '')), ('start;end', ';', ('start', 'end')), ('start ; end', ';', ('start', 'end')), (' start ; end ', ';', ('start', 'end')), ('start@end', '@', ('start', 'end')), ('start @ end', '@', ('start', 'end')), (' start @ end ', '@', ('start', 'end')), ) for spec, sep, expected_output in test_cases: output = split_spec(spec, sep) _print_output(spec, output, expected_output) assert output == expected_output