%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/test/__pycache__/test_tcp_internals.cpython-312.pyc |
� Ϫ�f�2 � � � d Z ddlZddlZddlZ ddlZddlmZ ddlm Z m Z ddlmZm Z ddlmZmZ ddlmZmZmZmZmZmZmZmZmZmZmZ ddlmZ dd lm Z dd l!m"Z" ee jF jI e � d� G d� d e"� � Z% ee jF jI e � d� G d� de"� � Z&y# e$ r dZY ��w xY w)z Whitebox tests for TCP APIs. � N)�skipIf)� interfaces�reactor)� gatherResults� maybeDeferred)�Protocol� ServerFactory)�_ACCEPT_ERRORS�EAGAIN�ECONNABORTED�EINPROGRESS�EMFILE�ENFILE�ENOBUFS�ENOMEM�EPERM�EWOULDBLOCK�Port)�log)�platform)�TestCasez?This test only applies to reactors that implement IReactorFDsetc �h � e Zd ZdZdZd� Zd� Zd� Z e e j � dk( d� d� � Zy ) �PlatformAssumptionsTestsz4 Test assumptions about platform behaviors. i c � � g | _ t �ddlm} t |� � dz }t j t j � | _ t j t j || j d f� |dz | _ y y )Nr )�_listOpenFDs� � �d ) �openSockets�resource�twisted.internet.processr �len� getrlimit� RLIMIT_NOFILE�originalFileLimit� setrlimit�socketLimit)�selfr �newLimits �A/usr/lib/python3/dist-packages/twisted/test/test_tcp_internals.py�setUpzPlatformAssumptionsTests.setUp4 s{ � ������ >��<�>�*�Q�.�H�%-�%7�%7��8N�8N�%O�D�"�����&�&��4�3I�3I�!�3L�(M� � (�#�~�D�� � c �^ � | j r5| j j � j � | j r�5t �ft j t j � d }t | j d |� }t j t j ||f� y y )Nr r ) r �pop�closer r# r$ �minr% r&