Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/web/test/__pycache__/test_wsgi.cpython-39.pyc
Ðазад
a k�h�* � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddl m Z ddlmZ ddl mZmZ ddlmZmZ dd lmZ dd lmZmZ ddlmZ ddlmZ dd lmZ ddlmZ ddl m!Z!m"Z" ddl#m$Z$ ddl%m&Z&m'Z' ddl(m)Z)m*Z*m+Z+ ddl,m-Z- ddl.m/Z/ G dd� d�Z0G dd� d�Z1G dd� de"�Z2G dd� d�Z3G dd� de3e"�Z4G dd � d e3�Z5G d!d"� d"e5e"�Z6G d#d$� d$e5e"�Z7G d%d&� d&e5e"�Z8G d'd(� d(e5e"�Z9G d)d*� d*e3e"�Z:G d+d,� d,e3e"�Z;dS )-z Tests for L{twisted.web.wsgi}. � N)�exc_info)�quote)�verifyObject)�reactor)�IPv4Address�IPv6Address)�Deferred� gatherResults)�ConnectionLost)�Logger�globalLogPublisher)�Failure)�getThreadID)� ThreadPool)�EventLoggingObserver)�SkipTest�TestCase)�http)� IResource�Resource)�Request�Site�version)�DummyChannel)�WSGIResourcec @ s e Zd ZdZe� Zdd� ZdS )�SynchronousThreadPoola A single-threaded implementation of part of the L{ThreadPool} interface. This implementation calls functions synchronously rather than running them in a thread pool. It is used to make the tests which are not directly for thread-related behavior deterministic. c O s6 z||i |�� W n t y0 | j�d� Y n0 dS )zp Call C{f(*a, **kw)} in this thread rather than scheduling it to be called in a thread. z<Callable passed to SynchronousThreadPool.callInThread failedN)� BaseException�_logZfailure��self�f�a�kw� r# ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/web/test/test_wsgi.py�callInThread+ s �z"SynchronousThreadPool.callInThreadN)�__name__� __module__�__qualname__�__doc__r r r% r# r# r# r$ r ! s r c @ s e Zd ZdZdd� ZdS )�SynchronousReactorThreadsa� A single-threaded implementation of part of the L{IReactorThreads} interface. This implementation assumes that it will only be invoked from the reactor thread, so it calls functions synchronously rather than trying to schedule them to run in the reactor thread. It is used in conjunction with L{SynchronousThreadPool} to make the tests which are not directly for thread-related behavior deterministic. c O s ||i |�� dS )ze Call C{f(*a, **kw)} in this thread which should also be the reactor thread. Nr# r r# r# r$ �callFromThreadE s z(SynchronousReactorThreads.callFromThreadN�r&