Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/cheroot/test/__pycache__/conftest.cpython-39.pyc
Ðазад
a p�h� � @ s� d Z ddlZddlZddlZddlmZmZ ddlmZm Z ddl mZmZm Z mZ ddl mZ ejdd � �Zejd d� �Zejdd � �Zejdd� �Zejdd� �Zejdd� �Zdd� ZdS )z�Pytest configuration module. Contains fixtures, which are tightly bound to the Cheroot framework itself, useless for end-users' app testing. � N� ��IS_MACOS� IS_WINDOWS)�Gateway� HTTPServer)� native_server�thread_and_wsgi_server�thread_and_native_server�wsgi_server��get_server_clientc C s d} t r| d9 } tr| d9 } | S )z<Return a common HTTP request timeout for tests with queries.皙�����?r � r )Zcomputed_timeout� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/cheroot/test/conftest.py�http_request_timeout s r c C s | \}}|S )z^Set up and tear down a Cheroot WSGI server instance. This exposes the server thread. r )r � server_thread�_srvr r r �wsgi_server_thread% s r c C s | \}}|S )z^Set up and tear down a Cheroot HTTP server instance. This exposes the server thread. r )r r r r r r �native_server_thread0 s r c C s t | �S )z.Create a test client out of given WSGI server.r )r r r r �wsgi_server_client; s r c C s t | �S )z.Create a test client out of given HTTP server.r )r r r r �native_server_clientB s r c c sV dd� } t | � �}t|� |V zt|�}|dur"|�� q"W n tyP Y n0 dS )z(Provision a server creator as a fixture.c s s* d V } | d u rd S t | �}|V |V d S )N)�make_http_server�� bind_addr� httpserverr r r � start_srvL s zhttp_server.<locals>.start_srvN)�iter�next�stop� StopIteration)r Zsrv_creatorr r r r �http_serverI s r"