Python test

This commit is contained in:
Snack committed 2014-10-15 11:09:37 +09:00
1 parent a809be2fa0
commit 9a94a59b4b
3 files changed
+73 -3

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import sys
sys.path.append("..")
from md6 import md6hash
md6 = md6hash()
f = open("result.csv", "r")
result = f.readlines()
f.close()
total = 0
ok = 0
for line in result:
size, data, comp = line.strip().split(",")
size = int(size)
hash = md6.hex(data, size)
total += 1
if hash == comp:
ok += 1
print "%d / %d test(s) passed." % (ok, total)