src/reportlab/graphics/testshapes.py
changeset 4551 d357e2acc856
parent 4528 e09377955af8
child 4567 5612ef8ef0a8
equal deleted inserted replaced
4550:80dd9e83dad9 4551:d357e2acc856
   485                 funcNames.append(funcName)
   485                 funcNames.append(funcName)
   486 
   486 
   487     return funcNames
   487     return funcNames
   488 
   488 
   489 def _evalFuncDrawing(name, D, l=None, g=None):
   489 def _evalFuncDrawing(name, D, l=None, g=None):
       
   490     if g is None: g = globals()
       
   491     if l is None: l = locals()
       
   492     func = l.get(name,g.get(name,None))
   490     try:
   493     try:
   491         d = eval(name + '()', g or globals(), l or locals())
   494         d = func()
   492     except:
   495     except:
   493         d = getFailedDrawing(name)
   496         d = getFailedDrawing(name)
   494     D.append((d, eval(name + '.__doc__'), name[3:]))
   497     D.append((d, getattr(func,'.__doc__',''), name[3:]))
   495 
   498 
   496 def getAllTestDrawings(doTTF=1):
   499 def getAllTestDrawings(doTTF=1):
   497     D = []
   500     D = []
   498     for f in getAllFunctionDrawingNames(doTTF=doTTF):
   501     for f in getAllFunctionDrawingNames(doTTF=doTTF):
   499         _evalFuncDrawing(f,D)
   502         _evalFuncDrawing(f,D)