diff tests/test-parseindex2.py @ 16620:e22d6b1dec1d stable

tests: fix test-parseindex2.py when run with --pure
author Bryan O'Sullivan <bryano@fb.com>
date Fri, 11 May 2012 02:32:26 -0700
parents e8d37b78acfb
children e57c532c3835
line wrap: on
line diff
--- 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"