def _parse_split_test_data_str():
 tuple_class = collections.namedtuple('TestCase', 'input, keep, no_keep')
 for line in test_data_str.splitlines():
  if (not line):
   continue
  data = line.split('/')
  item = tuple_class(input=data[0], keep=data[1].split('|'), no_keep=data[2].split('|'))
  (yield item)
 (yield tuple_class(input='', keep=[], no_keep=[]))

def _parse_split_test_data_str ( ) : tuple_class = collections . namedtuple ( 'TestCase' , 'input, keep, no_keep' ) for line in test_data_str . splitlines ( ) : if ( not line ) : continue data = line . split ( '/' ) item = tuple_class ( input = data [ 0 ] , keep = data [ 1 ] . split ( '|' ) , no_keep = data [ 2 ] . split ( '|' ) ) ( yield item ) ( yield tuple_class ( input = '' , keep = [ ] , no_keep = [ ] ) )
parse the test data set into a namedtuple to use in tests .