Package test :: Module test_support :: Class TransientResource |
[hide private]
[frames] | no frames]

# Class TransientResource

source code

    object --+
             |
            TransientResource

Raise ResourceDenied if an exception is raised while the context manager is in effect that matches the specified exception and attributes.

Instance Methods | [hide private]
__init__(self, exc, **kwargs) x.__init__(...) initializes x; see help(type(x)) for signature | source code
__enter__(self) | source code
__exit__(self, type_=None, value=None, traceback=None) If type_ is a subclass of self.exc and value has attributes matching self.attrs, raise ResourceDenied. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, exc, **kwargs) (Constructor) | source code
x.__init__(...) initializes x; see help(type(x)) for signature Overrides: object.__init__ (inherited documentation)

### __exit__(self, type_=None, value=None, traceback=None) | source code
If type_ is a subclass of self.exc and value has attributes matching self.attrs, raise ResourceDenied. Otherwise let the exception propagate (if any).