summaryrefslogtreecommitdiff
path: root/tests/test-parseindex2.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-parseindex2.py')
-rw-r--r--tests/test-parseindex2.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/tests/test-parseindex2.py b/tests/test-parseindex2.py
index 1098226..c42db80 100644
--- a/tests/test-parseindex2.py
+++ b/tests/test-parseindex2.py
@@ -52,6 +52,7 @@ def py_parseindex(data, inline) :
return index, cache
+
data_inlined = '\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x01\x8c' \
'\x00\x00\x04\x07\x00\x00\x00\x00\x00\x00\x15\x15\xff\xff\xff' \
'\xff\xff\xff\xff\xff\xebG\x97\xb7\x1fB\x04\xcf\x13V\x81\tw\x1b' \
@@ -93,16 +94,13 @@ data_non_inlined = '\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01D\x19' \
'\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00' \
'\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-def parse_index2(data, inline):
- index, chunkcache = parsers.parse_index2(data, inline)
- return list(index), chunkcache
-
def runtest() :
+
py_res_1 = py_parseindex(data_inlined, True)
- c_res_1 = parse_index2(data_inlined, True)
+ c_res_1 = parsers.parse_index2(data_inlined, True)
py_res_2 = py_parseindex(data_non_inlined, False)
- c_res_2 = parse_index2(data_non_inlined, False)
+ c_res_2 = parsers.parse_index2(data_non_inlined, False)
if py_res_1 != c_res_1:
print "Parse index result (with inlined data) differs!"
@@ -110,17 +108,6 @@ def runtest() :
if py_res_2 != c_res_2:
print "Parse index result (no inlined data) differs!"
- ix = parsers.parse_index2(data_inlined, True)[0]
- for i, r in enumerate(ix):
- if r[7] == nullid:
- i = -1
- try:
- if ix[r[7]] != i:
- print 'Reverse lookup inconsistent for %r' % r[7].encode('hex')
- except TypeError:
- # pure version doesn't support this
- break
-
print "done"
runtest()