Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/test/__pycache__/test_log.cpython-39.pyc
Ðазад
a k�h� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlmZm Z ddl mZmZm ZmZ ddlmZ ddlmZmZ ddlmZ ddlmZ G d d � d e�ZG dd� dej�ZG d d� dej�ZG dd� de�Ze� e� G dd� d�Z!G dd� d�Z"G dd� de!e"�Z#G dd� d�Z$G dd� de$ej�Z%G dd� de$ej�Z&G dd� dej�Z'G dd � d ej�Z(G d!d"� d"ej�Z)G d#d$� d$ej�Z*dS )%z" Tests for L{twisted.python.log}. � N)�IOBase�StringIO)�LogBeginner�LoggingFile�LogLevel�LogPublisher)�handlerAndBytesIO)�failure�log)r )�unittestc @ s e Zd ZdZdS )�FakeWarningz A unique L{Warning} subclass used by tests for interactions of L{twisted.python.log} with the L{warnings} module. N)�__name__� __module__�__qualname__�__doc__� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/test/test_log.pyr s r c @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )�TextFromEventDictTestsz) Tests for L{textFromEventDict}. c C s$ t dd�}t�|�}| �|d� dS )zj The C{"message"} value, when specified, is concatenated to generate the message. )�a�b�c)�messageza b cN��dictr �textFromEventDict�assertEqual��self� eventDict�textr r r �test_message) s z#TextFromEventDictTests.test_messagec C s* t ddddd�}t�|�}| �|d� dS )zW The C{"format"} value, when specified, is used to format the message. r r zHello, %(foo)s!Zdude)r �isError�format�foozHello, dude!Nr r r r r �test_format2 s z"TextFromEventDictTests.test_formatc C s$ t ddd�}t�|�}| �|� dS )zb If C{"format"} is unspecified and C{"message"} is empty, return L{None}. r r �r r! N)r r r ZassertIsNoner r r r �test_noMessageNoFormat: s z-TextFromEventDictTests.test_noMessageNoFormatc C sP z t � �W n@ tyJ tddt�� dd�}t�|�}| �|�d�� Y n0 dS )zO The C{"why"} value, when specified, is first part of message. r � r# )r r! r �whyzfoo N� �RuntimeError� BaseExceptionr r �Failurer r � assertTrue� startswithr r r r �test_whySpecifiedC s � z(TextFromEventDictTests.test_whySpecifiedc C sN z t � �W n> tyH tddt�� d�}t�|�}| �|�d�� Y n0 dS )zY The C{"why"} value, when unspecified, defaults to C{"Unhandled Error"}. r r'