original_docstring: Wait for a widget to get destroyed.
  
      
docstring: Wait for a widget to get destroyed.
docstring_tokens: Wait for a widget to get destroyed .
code: def wait_for_destruction(qtbot, widget):
      """Wait for a widget to get destroyed.
  
      """
      if widget.is_destroyed:
          return
      obs = EventObserver()
      widget.observe('destroyed', obs.callback)
      qtbot.wait_until(obs.assert_called)
code_tokens: def wait_for_destruction ( qtbot , widget ) : if widget . is_destroyed : return obs = EventObserver ( ) widget . observe ( 'destroyed' , obs . callback ) qtbot . wait_until ( obs . assert_called )
short_docstring: Wait for a widget to get destroyed.
short_docstring_tokens: Wait for a widget to get destroyed .
comment: """Wait for a widget to get destroyed.
  
      """