%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/logger/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/logger/test/__pycache__/test_logger.cpython-312.pyc |
� Ϫ�f � �� � d Z ddlmZmZmZmZ ddlmZ ddlm Z ddl mZ ddlm Z ddlmZ dd lmZmZ dd lmZmZ ddlmZ G d� d e� Z G d� d� Z G d� dej4 � Zy)z+ Test cases for L{twisted.logger._logger}. � )�List�Optional�Type�cast)�implementer)� NamedConstant)�unittest� )�formatEvent)�globalLogPublisher)�ILogObserver�LogEvent)�InvalidLogLevelError�LogLevel��Loggerc �2 � e Zd ZdZ ddedee deddfd�Zy) � TestLoggerz^ L{Logger} with an overridden C{emit} method that keeps track of received events. N�level�format�kwargs�returnc � � � t t � dt dd f� fd�� }t j |� t j � ||fi |�� t j |� |||d�� _ y # t j |� w xY w)N�eventr c � �� | �_ y �N)r �r �selfs ��A/usr/lib/python3/dist-packages/twisted/logger/test/test_logger.py�observerz!TestLogger.emit.<locals>.observer s �� ��D�J� )r r r ) r r r r �addObserverr �emit�removeObserver�emitted)r r r r r s ` r r# zTestLogger.emit s� �� � �\� "� �H� �� � #� � �&�&�x�0� 8��K�K��e�V�6�v�6��-�-�h�7� ��� ���� �-�-�h�7�s �A1 �1Br ) �__name__� __module__�__qualname__�__doc__r r �str�objectr# � r! r r r s6 � �� =A� �"� �,4�S�M� �LR� � � r! r c �B � e Zd ZdZ e� Zddee ddfd�Zdefd�Z y)�LogComposedObjectz3 A regular object, with a logger attached. N�stater c � � || _ y r �r/ )r r/ s r �__init__zLogComposedObject.__init__7 s � ��� r! c �"