Commits
76 76 | for j in range(x.shape[1]): |
77 77 | for k in range(x.shape[2]): |
78 78 | for l in range(x.shape[3]): |
79 79 | if not (abs(x[i][j][k][l]-num) < tolerance): |
80 80 | print("x[",i,"][",j,"][",k,"][",l,"]=", x[i][j][k]) |
81 81 | return False |
82 82 | if len(x.shape)>4: |
83 83 | stop('unhandled array shape in alleq') |
84 84 | return True |
85 85 | |
86 - | def test_start(msg): |
87 - | global total, current_test |
88 - | total += 1 |
89 - | print() |
90 - | print(stars + " Test " + msg + " start " + stars) |
91 - | current_test = msg |
86 + | #def test_start(msg): |
87 + | # global total, current_test |
88 + | # total += 1 |
89 + | # print() |
90 + | # print(stars + " Test " + msg + " start " + stars) |
91 + | # current_test = msg |
92 92 | |
93 - | def test_end(condition, error_msg): |
94 - | global total, fail |
95 - | status = "OK" |
96 - | if not condition: |
97 - | print(error_msg, file=sys.stderr) |
98 - | fail += 1 |
99 - | status = "FAIL" |
100 - | print(stars + " Test " + current_test + " " + status + " " + stars) |
93 + | #def test_end(condition, error_msg): |
94 + | # global total, fail |
95 + | # status = "OK" |
96 + | # if not condition: |
97 + | # print(error_msg, file=sys.stderr) |
98 + | # fail += 1 |
99 + | # status = "FAIL" |
100 + | # print(stars + " Test " + current_test + " " + status + " " + stars) |
101 101 | |
102 102 | imagename_a = "aa.im" |
103 103 | imagename_b = "ab.im" |
104 104 | iname = "CAS_8345.im" |
105 105 | out = "8345.out" |
106 106 | out1 = 'regridded' |
107 107 | out2 = 'bigger_image' |
108 108 | out3 = 'shifted_image' |
109 109 | out4 = 'back_to_image' |
110 110 | out5 = 'template' |
951 951 | myia.done() |
952 952 | teststr = "version" |
953 953 | self.assertTrue(teststr in msgs[-2], "'" + teststr + "' not found") |
954 954 | teststr = "imregrid" |
955 955 | self.assertTrue(teststr in msgs[-1], "'" + teststr + "' not found") |
956 956 | |
957 957 | def suite(): |
958 958 | return [imregrid_test] |
959 959 | |
960 960 | if __name__ == '__main__': |
961 - | unittest.main() |
961 + | unittest.main() |