Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/trial/test/__pycache__/test_asyncassertions.cpython-39.pyc
Ðазад
a k�h� � @ sF d Z ddlZddlmZ ddlmZ ddlmZ G dd� dej�Z dS )zL Tests for async assertions provided by C{twisted.trial.unittest.TestCase}. � N)�defer)�failure)�unittestc @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )�AsynchronousAssertionsTestszp Tests for L{TestCase}'s asynchronous extensions to L{SynchronousTestCase}. That is, assertFailure. c C s t �dd� �}| �|t�S )Nc S s dd S �N� r � r r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/trial/test/test_asyncassertions.py�<lambda> � z@AsynchronousAssertionsTests.test_assertFailure.<locals>.<lambda>)r � maybeDeferred� assertFailure�ZeroDivisionError��self�dr r r �test_assertFailure s z.AsynchronousAssertionsTests.test_assertFailurec s: t �dd� �}� �|t� |�� fdd�� fdd�� |S )Nc S s dd S r r r r r r r r zOAsynchronousAssertionsTests.test_assertFailure_wrongException.<locals>.<lambda>c s � � d�S �NzShould have failed��fail��x�r r r r r c s | � � j�S �N�Ztrap�failureExceptionr r r r r r )r r r � OverflowError�addCallbacksr r r r �!test_assertFailure_wrongException s �z=AsynchronousAssertionsTests.test_assertFailure_wrongExceptionc s6 t �d �}� �|t� |�� fdd�� fdd�� |S )Nc s � � d�S r r r r r r r '