tests/test_rl_accel.py
changeset 4389 61a7f0840d00
parent 4367 9960d82643bf
child 4413 dec33c7e7922
equal deleted inserted replaced
4388:9f93d62b9f6e 4389:61a7f0840d00
   155                 V.sort()
   155                 V.sort()
   156                 return 'ABag(%s)' % ','.join(V)
   156                 return 'ABag(%s)' % ','.join(V)
   157 
   157 
   158         for func,kind in getFuncs('sameFrag'):
   158         for func,kind in getFuncs('sameFrag'):
   159             if not func: continue
   159             if not func: continue
   160             a=ABag(fontName='Helvetica',fontSize=12, textColor="red", rise=0, underline=0, strike=0, link="aaaa")
   160             a=ABag(fontName='Helvetica',fontSize=12, textColor="red", rise=0, us_lines=0, link="aaaa")
   161             b=ABag(fontName='Helvetica',fontSize=12, textColor="red", rise=0, underline=0, strike=0, link="aaaa")
   161             b=ABag(fontName='Helvetica',fontSize=12, textColor="red", rise=0, us_lines=0, link="aaaa")
   162             for name in ("fontName", "fontSize", "textColor", "rise", "underline", "strike", "link"):
   162             for name in ("fontName", "fontSize", "textColor", "rise", "us_lines", "link"):
   163                 old = getattr(a,name)
   163                 old = getattr(a,name)
   164                 assert func(a,b)==1, "%s sameFrag(%s,%s)!=1" % (kind,a,b)
   164                 assert func(a,b)==1, "%s sameFrag(%s,%s)!=1" % (kind,a,b)
   165                 assert func(b,a)==1, "%s sameFrag(%s,%s)!=1" % (kind,b,a)
   165                 assert func(b,a)==1, "%s sameFrag(%s,%s)!=1" % (kind,b,a)
   166                 setattr(a,name,None)
   166                 setattr(a,name,None)
   167                 assert func(a,b)==0, "%s sameFrag(%s,%s)!=0" % (kind,a,b)
   167                 assert func(a,b)==0, "%s sameFrag(%s,%s)!=0" % (kind,a,b)