Changeset 243 for 06/libkombilo-branches/hash_center/test_hash_center2.py
- Timestamp:
- 03/22/07 22:41:18 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
06/libkombilo-branches/hash_center/test_hash_center2.py
r242 r243 52 52 (gl.lookupLabel(x,y), cont.B, cont.wB, cont.lB, cont.W, cont.wW, cont.lW)) 53 53 54 if nh_result != h_result: 55 print nh_result 56 print h_result 57 raise Exception() 54 if ''.join(nh_result) != ''.join(h_result): 55 out1 = open('nh_result', 'ab') 56 out1.write(''.join(nh_result)) 57 out1.close() 58 out2 = open('h_result', 'ab') 59 out2.write(''.join(h_result)) 60 out1.close() 58 61 return (nohash_time, hash_time) 59 62 … … 102 105 103 106 start = time.time() 104 gl = GameList( 't1.db')107 gl = GameList(sys.argv[1] + '.db') 105 108 end = time.time() 106 109 print gl.size(), 'games in the database' … … 108 111 for pattern in pl: 109 112 print pattern.printPattern() 110 print 'nh, h:', timed_search(gl, pattern) 113 print timed_search(gl, pattern) 114 print 'num hits:', gl.num_hits 115 print '..................................................................' 116 print 111 117
