Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/logger/test/__pycache__/ |
Upload File : |
o �bU � @ s0 d Z ddlmZmZmZ z ddlmZ e W n ey! dZY nw ddlm Z ddl mZmZm Z ddlmZ ddlmZ d d lmZmZmZmZmZmZ d dlmZ d dlmZ G d d� dej�ZG dd� dej�ZG dd� dej�Z G dd� dej�Z!G dd� d�Z"G dd� de#�Z$G dd� dej�Z%dS )z+ Test cases for L{twisted.logger._format}. � )�AnyStr�Optional�cast)�tzsetN)�Failure)�addTZCleanup�mktime�setTZ)�unittest)�SkipTest� )�eventAsText�formatEvent�formatEventAsClassicLogText� formatTime�formatUnformattableEvent�formatWithCall)�LogEvent)�LogLevelc @ sV e Zd ZdZddd�Zddd�Zddd �Zdd d�Zddd �Zddd�Z ddd�Z dS )�FormattingTestsz5 Tests for basic event formatting functions. �returnNc s� dt dtdtf� fdd�}� �d|d�� � �d|d�� � �d|d dd �� � �d|dd dd� d�� � �d|d�� � �d|d�� |ddd�}� �d|� ttd��}� �d| d |ddd�� dS )ac L{formatEvent} will format an event according to several rules: - A string with no formatting instructions will be passed straight through. - PEP 3101 strings will be formatted using the keys and values of the event as named fields. - PEP 3101 keys ending with C{()} will be treated as instructions to call that key (which ought to be a callable) before formatting. L{formatEvent} will always return L{str}, and if given bytes, will always treat its format string as UTF-8 encoded. � logFormat�eventr c s$ | |d<