%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/logger/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/logger/test/__pycache__/test_file.cpython-312.pyc |
� Ϫ�f� � �� � d Z ddlmZ ddlmZ ddlmZmZmZm Z m Z mZ ddlm Z ddlmZ ddlmZ ddlmZ d d lmZmZ d dlmZ G d� d e� Z G d� de� Z G d� d� Zy)z) Test cases for L{twisted.logger._file}. � )�StringIO)� TracebackType)�IO�Any�AnyStr�Optional�Type�cast)�BrokenMethodImplementation)�verifyObject)�Failure)�TestCase� )�FileLogObserver�textFileLogObserver)�ILogObserverc �R � e Zd ZdZdd�Zdd�Zdee deddfd�Z dd �Z dd �Zdd�Zy) �FileLogObserverTestsz' Tests for L{FileLogObserver}. �returnNc �� � t � 5 }t |d� � } t t |� ddd� y# t $ r}| j |� Y d}~�(d}~ww xY w# 1 sw Y yxY w)z; L{FileLogObserver} is an L{ILogObserver}. c � � t | � S �N��str��es �?/usr/lib/python3/dist-packages/twisted/logger/test/test_file.py�<lambda>z5FileLogObserverTests.test_interface.<locals>.<lambda> � � �S��V� � N)r r r r r �fail)�self� fileHandle�observerr s r �test_interfacez#FileLogObserverTests.test_interface s` � � �Z� �:�&�z�3C�D�H� ��\�8�4� � �� .� �� � �!���� �� � �s+ �A�3� A�A� A�A�A�A#c �� � t � 5 }t |d� � }t d�� } ||� | j |j � t |� � ddd� y# 1 sw Y yxY w)zV L{FileLogObserver} writes to the given file when it observes events. c � � t | � S r r r s r r z9FileLogObserverTests.test_observeWrites.<locals>.<lambda>* r r � ��xN)r r �dict�assertEqual�getvaluer �r"