tests: fix test-parseindex2.py when run with --pure stable
authorBryan O'Sullivan <bryano@fb.com>
Fri, 11 May 2012 02:32:26 -0700
branchstable
changeset 16620 e22d6b1dec1d
parent 16619 bc84a1aeaf5a
child 16621 8c3c9031f5aa
child 16630 f30226b1a46a
tests: fix test-parseindex2.py when run with --pure
tests/test-parseindex2.py
--- a/tests/test-parseindex2.py	Fri May 11 01:55:33 2012 -0700
+++ b/tests/test-parseindex2.py	Fri May 11 02:32:26 2012 -0700
@@ -114,8 +114,12 @@
     for i, r in enumerate(ix):
         if r[7] == nullid:
             i = -1
-        if ix[r[7]] != i:
-            print 'Reverse lookup inconsistent for %r' % r[7].encode('hex')
+        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"