|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/site-packages/mako/testing/__pycache__/ |
U
O��g) � @ s� d dl Z d dlZd dlZd*dd�Zd+dd�Zd,dd�Zd-dd �Zd
d� Zdd
� Zdd� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zd.dd�ZG dd� d�Ze jd/dd ��Zd0d!d"�Zd1d#d$�Zd2d&d'�Zd3d(d)�ZdS )4� Nc C s | |kst |pd| |f ��dS )z.Assert a == b, with repr messaging on failure.z%r != %rN��AssertionError��a�b�msg� r �D/opt/cppython/lib/python3.8/site-packages/mako/testing/assertions.py�eq_ s r
c C s | |kst |pd| |f ��dS )z.Assert a != b, with repr messaging on failure.z%r == %rNr r r r r �ne_ s r c C s | |kst |pd| |f ��dS )z.Assert a in b, with repr messaging on failure.z%r not in %rNr r r r r �in_ s r c C s | |kst |pd| |f ��dS )z2Assert a in not b, with repr messaging on failure.z%r is in %rNr r r r r �not_in s r
c C s, | j | jk r(| js(ds(td| | j f ��dS )�G assert that any exception we're catching does not have a __context__
without a __cause__, and that __suppress_context__ is never set.
Python 3 will report nested as exceptions as "during the handling of
error X, error Y occurred". That's not what we want to do. We want
these exceptions in a cause chain.
FzZException %r was correctly raised but did not set a cause, within context %r as its cause.N)�__context__� __cause__�__suppress_context__r )� exceptionr r r � _assert_proper_exception_context s
����r c C s$ t | j|�s td| | j|f ��dS )r zcException %r was correctly raised but has cause %r, which does not have the expected cause type %r.N)�
isinstancer r )r � cause_clsr r r �_assert_proper_cause_cls/ s
��r c O s t | |||�S �N��_assert_raises��
except_cls� callable_�args�kwr r r �
assert_raises? s r c O s t | |||dd�S )NT��
check_contextr r r r r �!assert_raises_with_proper_contextC s r"