tests/test-pathencode.py
changeset 18435 8c019d2fd7c0
parent 18110 acfc6fab1361
child 19322 ff1586a3adc5
child 19318 9778c77f05d6
equal deleted inserted replaced
18434:3807ec0c6bba 18435:8c019d2fd7c0
   152         yield makepath(rng, x, y)
   152         yield makepath(rng, x, y)
   153 
   153 
   154 def runtests(rng, seed, count):
   154 def runtests(rng, seed, count):
   155     nerrs = 0
   155     nerrs = 0
   156     for p in genpath(rng, count):
   156     for p in genpath(rng, count):
   157         h = store._dothybridencode(p)    # uses C implementation, if available
   157         h = store._pathencode(p)    # uses C implementation, if available
   158         r = store._hybridencode(p, True) # reference implementation in Python
   158         r = store._hybridencode(p, True) # reference implementation in Python
   159         if h != r:
   159         if h != r:
   160             if nerrs == 0:
   160             if nerrs == 0:
   161                 print >> sys.stderr, 'seed:', hex(seed)[:-1]
   161                 print >> sys.stderr, 'seed:', hex(seed)[:-1]
   162             print >> sys.stderr, "\np: '%s'" % p.encode("string_escape")
   162             print >> sys.stderr, "\np: '%s'" % p.encode("string_escape")