def check_weights_test(): x = TPM(10, 5, 5) y = TPM(10, 5, 5) x.weights= [1,1,1,1,1,1,1,1,1,1] y.weights= [1,1,1,1,1,1,1,1,1,1] assert check_weights(x,y) == 0 y.weights = [0,0,0,0,0,0,0,0,0,0] assert check_weights(x, y) == -1 y.weights = [1,1,1,1,0,1,1,1,1,1] assert check_weights(x, y) == -1 print "check_weights_test passed"
def print_weights_test(): x = TPM(5, 2, 10) x.weights = [1,2,1,2,1] x.print_weights() #Check this by seeing what it prints out print "print_weights_test passed? Look to check for sure."