def divide_line(): from functions.divide_line.divide_line import test path = 'functions/divide_line/test_set/' tests = read_file(path+'test_list') test_list = tests.split('\n') for test_name in test_list: if test_name == '':continue test_data = get_test(path+test_name) print "TEST:", test_name test(test_data['input'], test_data['output']) return False
def divide_line(): from functions.divide_line.divide_line import test path = 'functions/divide_line/test_set/' tests = read_file(path + 'test_list') test_list = tests.split('\n') for test_name in test_list: if test_name == '': continue test_data = get_test(path + test_name) print "TEST:", test_name test(test_data['input'], test_data['output']) return False
def code_to_line_list(): from functions.code_to_line_list.code_to_line_list import test path = 'functions/code_to_line_list/test_set/' tests = read_file(path+'test_list') test_list = tests.split('\n') for test_name in test_list: if test_name == '':continue test_data = get_test(path+test_name) test_output = test_data['output'].split('\n') print "TEST:", test_name test(test_data['input'], test_output) return False
def split_into_block_and_code(target=''): from functions.split_into_block_and_code.split_into_block_and_code import test path = 'functions/split_into_block_and_code/test_set/' tests = read_file(path+'test_list') test_list = tests.split('\n') if target != '': test_list = [target] for test_name in test_list: if len(test_name) > 0 and test_name[0] == '#':continue if test_name == '':continue test_data = get_test_data(path+test_name, ['test_input','test_output']) print "TEST:", test_name test(test_data) return True
def code_to_line_list(): from functions.code_to_line_list.code_to_line_list import test path = 'functions/code_to_line_list/test_set/' tests = read_file(path + 'test_list') test_list = tests.split('\n') for test_name in test_list: if test_name == '': continue test_data = get_test(path + test_name) test_output = test_data['output'].split('\n') print "TEST:", test_name test(test_data['input'], test_output) return False
def split_into_block_and_code(target=''): from functions.split_into_block_and_code.split_into_block_and_code import test path = 'functions/split_into_block_and_code/test_set/' tests = read_file(path + 'test_list') test_list = tests.split('\n') if target != '': test_list = [target] for test_name in test_list: if len(test_name) > 0 and test_name[0] == '#': continue if test_name == '': continue test_data = get_test_data(path + test_name, ['test_input', 'test_output']) print "TEST:", test_name test(test_data) return True