示例#1
0
def prepro(test, dataname, *args):
    t0 = time.clock()
    data = test(*args)
    os.chdir(cwd + '/testdata')
    ctt.print_dictionary_to_file(data, dataname + '_data.txt')
    with open('testresults.txt', 'a') as f:
        if ctt.comparefiles(dataname + '_data.txt', './sdata/standard_' + dataname + '_data.txt') == 0:
            f.write(dataname + ' Passed   Time: ' + str(time.clock()-t0) + '(sec)\n')
            print dataname + ' Passed'
        else:
            f.write(dataname + ' Failed\n')
            print dataname + ' Failed'
示例#2
0
def prepro(test, dataname, *args):
    t0 = time.clock()
    data = test(*args)
    os.chdir(cwd + '/testdata')
    ctt.print_dictionary_to_file(data, dataname + '_data.txt')
    with open('testresults.txt', 'a') as f:
        if ctt.comparefiles(dataname + '_data.txt',
                            './sdata/standard_' + dataname + '_data.txt') == 0:
            f.write(dataname + ' Passed   Time: ' + str(time.clock() - t0) +
                    '(sec)\n')
            print dataname + ' Passed'
        else:
            f.write(dataname + ' Failed\n')
            print dataname + ' Failed'
示例#3
0
def prepro(test, dataname, *args):
    data = test(*args)
    os.chdir(cwd + '/testdata')
    ctt.print_dictionary_to_file(data, dataname + '_data.txt')
    return ctt.comparefiles(dataname + '_data.txt', './sdata/standard_' + dataname + '_data.txt')
示例#4
0
def prepro(test, dataname, *args):
    data = test(*args)
    os.chdir(cwd + '/testdata')
    ctt.print_dictionary_to_file(data, dataname + '_data.txt')
    return ctt.comparefiles(dataname + '_data.txt',
                            './sdata/standard_' + dataname + '_data.txt')