def test_unpackListRecur(self): lists = [ [88, 2, 3, 4], [1, 2, 3], [1, 2], [1], [5], [11,[ 12, 13, 14, 15, [ 's', 'b' ] ]] ] rst = util.unpackStrListRecur(lists) self.assertEqual(len(rst), 18)
def applyAddRule(rule): return list(map(rule, unpackStrListRecur(list(map(applyTransformRule, rulemap['transform'])))))
def test_op2File(self): rawtxt = io.readRawFile('test/data/simple.txt') config, classify = sorter.pickup(rawtxt) rst = dog.run(classify) output = '\n'.join(util.unpackStrListRecur(rst)) io.op2File(output, 'myoutput.txt')