Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/internet/test/__pycache__/test_default.cpython-39.pyc
Ðазад
a k�h[ � @ s� d Z ddlZddlZddlmZ ddlmZmZ ddlm Z ddl mZ ddlm Z ddlmZ dd lmZ ed d�Zed d�Zed d�Zed d�ZG dd� de�ZG dd� de�ZG dd� de�ZdS )z( Tests for L{twisted.internet.default}. � N)�default)�_getInstallFunction�install)�IReactorCore)� NoReactor)� requireModule)�Platform)�SynchronousTestCase�posix�otherZlinux2�nt�win32�darwinc @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �PollReactorTestsz� Tests for the cases of L{twisted.internet.default._getInstallFunction} in which it picks the poll(2) or epoll(7)-based reactors. c C s, t td�r| �|jd� n| �|jd� dS )zz Assert the given function will install the poll() reactor, or select() if poll() is unavailable. �pollztwisted.internet.pollreactor�twisted.internet.selectreactorN)�hasattr�select�assertEqual� __module__��selfr � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/internet/test/test_default.py�assertIsPoll s zPollReactorTests.assertIsPollc C s t t�}| �|� dS )z� L{_getInstallFunction} chooses the poll reactor on arbitrary Unix platforms, falling back to select(2) if it is unavailable. N)r �unixr r r r r � test_unix* s zPollReactorTests.test_unixc C s2 t t�}td�du r | �|� n| �|jd� dS )zu L{_getInstallFunction} chooses the epoll reactor on Linux, or poll if epoll is unavailable. ztwisted.internet.epollreactorN)r �linuxr r r r r r r r � test_linux2 s zPollReactorTests.test_linuxN)�__name__r �__qualname__�__doc__r r r r r r r r s r c @ s e Zd ZdZdd� Zdd� ZdS )�SelectReactorTestsz� Tests for the cases of L{twisted.internet.default._getInstallFunction} in which it picks the select(2)-based reactor. c C s t t�}| �|jd� dS )zM L{_getInstallFunction} chooses the select reactor on macOS. r N)r �osxr r r r r r �test_osxD s zSelectReactorTests.test_osxc C s t t�}| �|jd� dS )zO L{_getInstallFunction} chooses the select reactor on Windows. r N)r �windowsr r r r r r �test_windowsK s zSelectReactorTests.test_windowsN)r r r r! r$ r&