def scenegraphState(view, name):
 state = ('====== Scenegraph state for %s ======\n' % name)
 state += ('view size: %dx%d\n' % (view.width(), view.height()))
 state += ('view transform:\n' + indent(transformStr(view.transform()), '  '))
 for item in view.scene().items():
  if (item.parentItem() is None):
   state += (itemState(item) + '\n')
 return state

def scenegraphState ( view , name ) : state = ( '====== Scenegraph state for %s ======\n' % name ) state += ( 'view size: %dx%d\n' % ( view . width ( ) , view . height ( ) ) ) state += ( 'view transform:\n' + indent ( transformStr ( view . transform ( ) ) , '  ' ) ) for item in view . scene ( ) . items ( ) : if ( item . parentItem ( ) is None ) : state += ( itemState ( item ) + '\n' ) return state
return information about the scenegraph for debugging test failures .