File: //usr/lib/python3/dist-packages/twisted/logger/test/__pycache__/test_flatten.cpython-310.pyc
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"