Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/application/runner/test/__pycache__/ |
Upload File : |
o �b;2 � @ s� d Z ddlZddlmZ ddlmZmZ ddlm Z m Z mZ ddlm Z ddlZddlmZ ddlmZ dd lmZ d dlmZ dd lmZmZmZmZmZmZmZ de de f de de f fdd�ZG dd� dejj j!�Z"G dd� dejj j!�Z#dS )z3 Tests for L{twisted.application.runner._pidfile}. � N)�wraps)�getpid�name)�Any�Callable�Optional)�verifyObject)�FilePath)�platform)�SkipTest� )�_pidfile� )�AlreadyRunningError�InvalidPIDFileError�IPIDFile�NonePIDFile� NoPIDFound�PIDFile�StalePIDFileError�f.�returnc s* t � �dtdtdtdtf� fdd��}|S )a= Decorator for tests that are not expected to work on all platforms. Calling L{PIDFile.isRunning} currently raises L{NotImplementedError} on non-POSIX platforms. On an unsupported platform, we expect to see any test that calls L{PIDFile.isRunning} to raise either L{NotImplementedError}, L{SkipTest}, or C{self.failureException}. (C{self.failureException} may occur in a test that checks for a specific exception but it gets NotImplementedError instead.) @param f: The test method to decorate. @return: The wrapped callable. �self�args�kwargsr c sp t �� dk}|r� | g|�R i |��S | jtt| jf� | g|�R i |��}t|t�r6| �t|�� d�� d S d S )N�posixz isRunning is not implemented on ) r �getType�assertRaises�NotImplementedErrorr �failureException� isinstance� assertTrue�str� startswith)r r r � supported�e�r � �N/usr/lib/python3/dist-packages/twisted/application/runner/test/test_pidfile.py�wrapper1 s ��� �z$ifPlatformSupported.<locals>.wrapper)r r )r r) r'