Current File : //proc/self/root/lib/python3/dist-packages/twisted/web/test/__pycache__/test_wsgi.cpython-312.pyc |
�
Ϫ�fM' � �� � d Z ddlZddlZddlZddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZmZ ddlmZmZ dd lmZ dd
lmZ ddlmZmZ ddlmZ dd
lmZ ddlmZ ddl m!Z! ddl"m#Z# ddl$m%Z%m&Z& ddl'm(Z(m)Z)m*Z* ddl+m,Z, ddl-m.Z. G d� d� Z/ G d� d� Z0 G d� de!� Z1 G d� d� Z2 G d� de2e!� Z3 G d� d e2� Z4 G d!� d"e4e!� Z5 G d#� d$e4e!� Z6 G d%� d&e2e!� Z7 G d'� d(e2e!� Z8y))z
Tests for L{twisted.web.wsgi}.
� N)�exc_info)�quote)�verifyObject)�reactor)�IPv4Address�IPv6Address)�Deferred�
gatherResults)�ConnectionLost)�EventLoggingObserver)�Logger�globalLogPublisher)�Failure)�getThreadID)�
ThreadPool)�TestCase)�http)� IResource�Resource)�Request�Site�version)�DummyChannel)�WSGIResourcec �$ � e Zd ZdZ e� Zd� Zy)�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 �j � ||i |�� y# t $ r | j j d� Y yw xY w)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�_log�failure��self�f�a�kws �</usr/lib/python3/dist-packages/twisted/web/test/test_wsgi.py�callInThreadz"SynchronousThreadPool.callInThread+ s8 � �
�
�q�K�B�K��� �
�I�I���N�
� �s � �$2�2N)�__name__�
__module__�__qualname__�__doc__r
r r'