Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Member Functions | Private Attributes | List of all members
warnings.catch_warnings Class Reference
Inheritance diagram for warnings.catch_warnings:
_object

Public Member Functions

def __init__
 
def __repr__
 
def __enter__
 
def __exit__
 

Private Attributes

 _record
 
 _module
 
 _entered
 
 _filters
 
 _showwarning
 

Detailed Description

A context manager that copies and restores the warnings filter upon
exiting the context.

The 'record' argument specifies whether warnings should be captured by a
custom implementation of warnings.showwarning() and be appended to a list
returned by the context manager. Otherwise None is returned by the context
manager. The objects appended to the list are arguments whose attributes
mirror the arguments to showwarning().

The 'module' argument is to specify an alternative module to the module
named 'warnings' and imported under that name. This argument is only useful
when testing the warnings module itself.

Constructor & Destructor Documentation

def warnings.catch_warnings.__init__ (   self,
  record = False,
  module = None 
)
Specify whether to record warnings and if an alternative module
should be used other than sys.modules['warnings'].

For compatibility with Python 3.0, please consider all arguments to be
keyword-only.

Member Function Documentation

def warnings.catch_warnings.__enter__ (   self)
def warnings.catch_warnings.__exit__ (   self,
  exc_info 
)
def warnings.catch_warnings.__repr__ (   self)

Member Data Documentation

warnings.catch_warnings._entered
private
warnings.catch_warnings._filters
private
warnings.catch_warnings._module
private
warnings.catch_warnings._record
private
warnings.catch_warnings._showwarning
private

The documentation for this class was generated from the following file:

Copyright 2014 Google Inc. All rights reserved.