File: //usr/lib/python3/dist-packages/twisted/web/test/__pycache__/test_wsgi.cpython-38.pyc
U
��W[�1 � @ s� d Z eZddlmZ ddlZddlZddlZddlm Z ddl
mZmZm
Z
ddlmZ ddlmZ ddlmZ dd lmZmZ dd
lmZ ddlmZ ddlmZmZ dd
lmZ ddl m!Z!m"Z" ddl#m$Z$m%Z%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1m2Z2 G dd� d�Z3G dd� d�Z4G dd� de�Z5G dd� d�Z6G dd� de6e�Z7G dd � d e6�Z8G d!d"� d"e8e�Z9G d#d$� d$e8e�Z:G d%d&� d&e8e�Z;G d'd(� d(e8e�Z<G d)d*� d*e6e�Z=G d+d,� d,e6e�Z>dS )-z
Tests for L{twisted.web.wsgi}.
� )�exc_infoN)�verifyObject)�
intToBytes�urlquote�_PY3)�Failure)�getThreadID)�
ThreadPool)�Deferred�
gatherResults)�reactor)�ConnectionLost)�TestCase�SkipTest)�http)� IResource�Resource)�Request�Site�version)�WSGIResource)�DummyChannel)�globalLogPublisher�Logger)�EventLoggingObserver)�IPv4Address�IPv6Addressc @ 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 s, z|||� W n | j �d� Y nX 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)�_logZfailure��self�f�a�kw� r$ �</usr/lib/python3/dist-packages/twisted/web/test/test_wsgi.py�callInThread- s �z"SynchronousThreadPool.callInThreadN)�__name__�
__module__�__qualname__�__doc__r r r&