Your IP : 216.73.216.196
�
�mYc @` s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z d d l
Z
d d l m Z e d � � Z
d d � Z d � Z d e
j f d � � YZ d
e f d � � YZ d S( s4 recording warnings during test function execution. i ( t absolute_importt divisiont print_functionN( t
yield_fixturec c` s, t � } | � t j d � | VWd QXd S( s Return a WarningsRecorder instance that provides these methods:
* ``pop(category=None)``: return last warning matching the category.
* ``clear()``: clear list of warnings
See http://docs.python.org/library/warnings.html for information
on warning categories.
t defaultN( t WarningsRecordert warningst simplefilter( t wrec( ( s@ /opt/alt/python27/lib/python2.7/site-packages/_pytest/recwarn.pyt recwarn
s
c ` s� | s t d t � Sg � � f d � } d � f d � } t j } t j } | t _ | t _ z | | | � } Wd | t _ | t _ Xt t f � t � f d � � D� � s� t } t d | f � � n | S( sg assert that calling ``func(*args, **kwargs)`` triggers a
``DeprecationWarning`` or ``PendingDeprecationWarning``.
This function can be used as a context manager::
>>> import warnings
>>> def api_call_v2():
... warnings.warn('use v3 of this api', DeprecationWarning)
... return 200
>>> with deprecated_call():
... assert api_call_v2() == 200
Note: we cannot use WarningsRecorder here because it is still subject
to the mechanism that prevents warnings of the same type from being
triggered twice for the same module. See #1190.
t expected_warningc ` s � j | � d S( N( t append( t messaget categoryt argst kwargs( t
categories( s@ /opt/alt/python27/lib/python2.7/site-packages/_pytest/recwarn.pyt
warn_explicit4 s c ` s3 t | t � r"