Hacked By AnonymousFox
�
�܋f� � � � d dl Z d dlmZmZ d dlmZmZ eeee f Z G d� de j
� � Z G d� de� � ZdS )� N)�Union�Type)�
Comparison�comparec �@ � � e Zd ZdZdZdef� fd�Z� fd�Z� fd�Z� xZ S )�
ShouldWarna
This context manager is used to assert that warnings are issued
within the context it is managing.
:param expected: This should be a sequence made up of one or more elements,
each of one of the following types:
* A warning class, indicating that the type
of the warnings is important but not the
parameters it is created with.
* A warning instance, indicating that a
warning exactly matching the one supplied
should have been issued.
If no expected warnings are passed, you will need to inspect
the contents of the list returned by the context manager.
:param filters:
If passed, these are used to create a filter such that only warnings you
are interested in will be considered by this :class:`ShouldWarn`
instance. The names and meanings are the same as the parameters for
:func:`warnings.filterwarnings`.
F�expectedc � �� t t | � � � d�� � d� |D � � | _ || _ d S )NT)�recordc �, � g | ]}t |� � ��S � )�C)�.0�es �h/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/testfixtures/shouldwarn.py�
<listcomp>z'ShouldWarn.__init__.<locals>.<listcomp>) s � �0�0�0�!��1���0�0�0� )�superr �__init__r �filters)�selfr r � __class__s �r r zShouldWarn.__init__'