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 �b�% � @ s� d Z ddlZddlmZ ddlmZmZmZ zddlm Z W n e y) dZ Y nw ddlmZ ddl mZmZmZmZ dd lmZ dd lmZ G dd� dej�ZdS ) z+ Test cases for L{twisted.logger._format}. � N)�count)�Any�Callable�Optional)�tzset)�unittest� )�KeyFlattener� aFormatter�extractField�flattenEvent)�formatEvent)�LogEventc @ s� e Zd ZdZd"dd�Zd"dd�Zd"dd �Zd"d d�Z d#dee de fd d�Z d"dd�Zd"dd�Zd"dd�Z dd� fdee ge f ddfdd�Zd"dd�Zd"dd�Zd"dd�Zd"d d!�ZdS )$�FlatFormattingTestsz9 Tests for flattened event formatting functions. �returnNc sr t � � G dd� d�}td� fdd�|� dddd �}t|� t|�}|d = |d= t�t�|��}| �t|�d� d S )a) L{flattenEvent} will "flatten" an event so that, if scrubbed of all but serializable objects, it will preserve all necessary data to be formatted once serialized. When presented with an event thusly flattened, L{formatEvent} will produce the same output. c @ s e Zd ZdZdS )z;FlatFormattingTests.test_formatFlatEvent.<locals>.Ephemeral�valueN)�__name__� __module__�__qualname__� attribute� r r �B/usr/lib/python3/dist-packages/twisted/logger/test/test_flatten.py� Ephemeral% s r z�callable: {callme()} attribute: {object.attribute} numrepr: {number!r} numstr: {number!s} strrepr: {string!r} unistr: {unistr!s}c s t � �S �N)�nextr ��counterr r �<lambda>1 s z:FlatFormattingTests.test_formatFlatEvent.<locals>.<lambda>� �hello� ö)� log_format�callme�object�number�string�unistrr"