File: //home/arjun/projects/env/lib/python3.10/site-packages/_pytest/__pycache__/outcomes.cpython-310.pyc
o
%we( � @ sH d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm
Z
dd
lmZ dZ
e
rEddlmZ ndd
lmZ eZG dd� de�ZeefZG dd� de�ZG dd� de�ZG dd� de�Ze
dedef d�Ze
de e d�ZG dd� deeef �Zdedeegeeef f fdd�Zee� d:dd!�d"ed#ee d$ee defd%d&��Zee� d;ddd'�d"ed(e d$ee defd)d*��Z!ee�d<d"ed,e d$ee defd-d.��Z" d=d/ed"ed$ee defd0d1�Z#G d2d3� d3e�Z$ee$�d;d"edefd4d5��Z% d>d6ed7ee d"ee defd8d9�Z&dS )?zZException classes and constants handling test outcomes as well as
functions creating them.� N)�Any)�Callable)�cast)�NoReturn)�Optional)�Type)�TypeVar)�KEYWORD_MSG_ARGF)�Protocol)�Genericc sF e Zd ZdZddee deddf� fdd�
Zdefd d
�ZeZ � Z
S )�OutcomeExceptionzmOutcomeException and its subclass instances indicate and contain info
about test and collection outcomes.NT�msg�pytrace�returnc sN |d urt |t�sd}t|�t| �jt|�j���t� �|� || _|| _ d S )NzY{} expected string as 'msg' parameter, got '{}' instead.
Perhaps you meant to use a mark?)
�
isinstance�str� TypeError�format�type�__name__�super�__init__r
r )�selfr
r � error_msg�� __class__� �I/home/arjun/projects/env/lib/python3.10/site-packages/_pytest/outcomes.pyr s �
zOutcomeException.__init__c C s | j d ur| j S d| jj� d�S )N�<z
instance>)r
r r )r r r r �__repr__+ s
zOutcomeException.__repr__)NT)r �
__module__�__qualname__�__doc__r r �boolr r �__str__�
__classcell__r r r r r s
r c sH e Zd ZdZ d
dd�dee deded ed
df
� fdd�Z� ZS )�Skipped�builtinsNTF)�_use_item_locationr
r �allow_module_levelr( r c s t � j||d� || _|| _d S )N�r
r )r r r) r( )r r
r r) r( r r r r ; s
zSkipped.__init__)NTF)r r r! r r r# r r% r r r r r&