Current File : //proc/self/root/lib/python3/dist-packages/twisted/test/__pycache__/test_twistd.cpython-312.pyc |
�
Ϫ�f$! � � � d Z ddlZddlZddlZddlZddlZddlZ ddlZddl Z
e
Z eZddlm
Z
ddlmZ ddlmZ ddlmZ ddlmZmZmZ ddlmZmZmZ dd lmZ dd
lmZ ddl m!Z! ddl"m#Z#m$Z$ dd
l%m&Z& ddl'm(Z( ddl)m*Z*m+Z+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m*Z4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z= ddl>m?Z? ddl@mAZA e7d� ZBeBr
ddlCmDZDmEZEmFZF e7d� ZG e7d� ZH e7d� ZI e7d� ZJd � ZK G d!� d"� ZL G d#� d$ej� � ZN G d%� d&e=j� � ZP G d'� d(eA� ZQ eeB d)� G d*� d+eA� � ZR G d,� d-eA� ZS G d.� d/� ZT G d0� d1ej� � ZV G d2� d3eA� ZW eeB d)� G d4� d5eA� � ZX eeB d)� G d6� d7eA� � ZY eeB d)� G d8� d9eA� � ZZ G d:� d;� Z[ ee#� G d<� d=e[� � Z\ G d>� d?� Z] G d@� dAeA� Z^dB� Z_dC� Z` G dD� dEeA� Za eeB d)� G dF� dGeA� � Zb eeB dH� G dI� dJeA� � Zc ee$� G dK� dLe(� � Zd G dM� dNe=j� � ZedO� Zf G dP� dQeA� Zgy# e$ r dZ dZY ��aw xY w)RzE
Tests for L{twisted.application.app} and L{twisted.scripts.twistd}.
� N)�StringIO)�skipIf)�implementer)�verifyObject)�internet�logger�plugin)�app�reactors�service)�
IServiceMaker)�ReactorBase)�Deferred)�IReactorDaemonize�_ISupportsExitSignalCapturing)�AlternateReactor)�
MemoryReactor)�ILogObserver�globalLogBeginner�globalLogPublisher)�util)�
Componentized)�UserDatabase)r �textFromEventDict)�
requireModule)�platformType)�
UsageError)�twistd)�MockOS)�TestCaseztwisted.scripts._twistd_unix)�UnixApplicationRunner�
UnixAppLogger�checkPIDztwisted.python.syslog�profile�pstats�cProfilec �� ���� t j t j � � }t j t j � � �t � }|j ||j |�|j |j |j � ���fd�} | t d|j � | t d|� | t d|j � y)au
Patch L{pwd.getpwnam} so that it behaves as though only one user exists
and patch L{grp.getgrnam} so that it behaves as though only one group
exists.
@param patch: A function like L{TestCase.patch} which will be used to
install the fake implementations.
@type user: C{str}
@param user: The name of the single user which will exist.
@type uid: C{int}
@param uid: The UID of the single user which will exist.
@type group: C{str}
@param group: The name of the single user which will exist.
@type gid: C{int}
@param gid: The GID of the single group which will exist.
c � �� t �� }�||j �j � <