%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/twisted/internet/test/__pycache__/test_posixbase.cpython-312.pyc |
� Ϫ�f=. � �\ � d Z ddlZddlmZ ddlmZ ddlmZmZ ddl m Z ddlmZ ddl mZ dZ dd lmZ dd lmZ ddlmZ dd lmZ G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Zy# e$ r dZY �nw xY w)z> Tests for L{twisted.internet.posixbase} and supporting code. � N)�Deferred)�IReadDescriptor)�PosixReactorBase�_Waker)� ServerFactory)�platform)�TestCase)�unix)�ClientProtoz)Platform does not support AF_UNIX sockets)�reactor)�Portc �, � � e Zd ZdZ� fd�Z� fd�Z� xZS )�WarningCheckerTestCasezg A test case that will make sure that no warnings are left unchecked at the end of a test run. c �� �� t �| � � t j j dd� j � dk( r&t j � r| j � y y y )N�CI� �true) �super�setUp�os�environ�get�lowerr � isWindows� flushWarnings)�self� __class__s ��F/usr/lib/python3/dist-packages/twisted/internet/test/test_posixbase.pyr zWarningCheckerTestCase.setUp sN �� � �� �� �:�:�>�>�$��#�)�)�+�v�5�(�:L�:L�:N���� � ;O�5� c � �� t �| � � | j � }t j j dd� j � dk( rt j � ry | j t |� dd|� �� y # | j � }t j j dd� j � dk( rt j � r Y y | j t |� dd|� �� w xY w)Nr r r r z'Warnings found at the end of the test: )r �tearDownr r r r r r r �assertEqual�len)r �warningsr s �r r! zWarningCheckerTestCase.tearDown+ s� �� � ��G����)�)�+�H��z�z�~�~�d�B�'�-�-�/�6�9�h�>P�>P�>R� �����H� �q�$L�X�J�"W� �� �)�)�+�H��z�z�~�~�d�B�'�-�-�/�6�9�h�>P�>P�>R� �����H� �q�$L�X�J�"W� �s �B �AD � D )�__name__� __module__�__qualname__�__doc__r r! � __classcell__)r s @r r r s �� �� !�� r r c �* � e Zd Zd� Zd� Zd� Zd� Zd� Zy)�TrivialReactorc �J � i | _ i | _ t j | � y �N)�_readers�_writersr �__init__�r s r r0 zTrivialReactor.__init__>