class_docstr: A context manager that will catch certain exceptions and provide an
  indication they occurred.
  
  >>> with ExceptionTrap() as trap:
  ...     raise Exception()
  >>> bool(trap)
  True
  
  >>> with ExceptionTrap() as trap:
  ...     pass
  >>> bool(trap)
  False
  
  >>> with ExceptionTrap(ValueError) as trap:
  ...     raise ValueError("1 + 1 is not 3")
  >>> bool(trap)
  True
  >>> trap.value
  ValueError('1 + 1 is not 3')
  >>> trap.tb
  <traceback object at ...>
  
  >>> with ExceptionTrap(ValueError) as trap:
  ...     raise Exception()
  Traceback (most recent call last):
  ...
  Exception
  
  >>> bool(trap)
  False
docstr: Wrap func and replace the result with the truth
  value of the trap (True if no exception).
  
  First, give the decorator an alias to support Python 3.8
  Syntax.
  
  >>> passes = ExceptionTrap(ValueError).passes
  
  Now decorate a function that always fails.
  
  >>> @passes
  ... def fail():
  ...     raise ValueError('failed')
  
  >>> fail()
  False
docstr_tok: ["Wrap","func","and","replace","the","result","with","the","truth","value","of","the","trap","(","True","if","no","exception",")",".","First",",","give","the","decorator","an","alias","to","support","Python","3.8","Syntax",".",">",">",">","passes","=","ExceptionTrap","(","ValueError",")",".passes","Now","decorate","a","function","that","always","fails",".",">",">",">","@","passes","...","def","fail","(",")",":","...","raise","ValueError","(","'failed","'",")",">",">",">","fail","(",")","False"]
code: def passes(self, func):
      """
      Wrap func and replace the result with the truth
      value of the trap (True if no exception).
  
      First, give the decorator an alias to support Python 3.8
      Syntax.
  
      >>> passes = ExceptionTrap(ValueError).passes
  
      Now decorate a function that always fails.
  
      >>> @passes
      ... def fail():
      ...     raise ValueError('failed')
  
      >>> fail()
      False
      """
      return self.raises(func, _test=operator.not_)
  
imports: import os
  import subprocess
  import contextlib
  import functools
  import tempfile
  import shutil
  import operator
  import warnings
label_desc: Use image node_id 9 for calling the ExceptionTrap obj's underlying member method code with example usage: obj.passes(func) and returns: self