File: //lib/python3/dist-packages/twisted/application/twist/test/__pycache__/test_options.cpython-310.pyc
o
�b�, � @ s� d Z ddlmZmZ ddlmZmZmZmZm Z m
Z
ddlZddl
mZ ddlmZ ddlmZ ddlmZmZmZmZ dd lmZ dd
lmZ ddlmZ dd
lmZ ddl m!Z! ddl"m#Z# ddl$m%Z% ddl%m&Z& G dd� dej'j(j)�Z*dS )z2
Tests for L{twisted.application.twist._options}.
� )�stderr�stdout)�Callable�Dict�List�Optional�TextIO�TupleN)�version)�reactor)�IReactorCore)�FileLogObserver�LogLevel�jsonFileLogObserver�textFileLogObserver)�
UsageError)�
MemoryReactor� )�
NoSuchReactor)�
ExitStatus)� DummyExit)�ServiceMaker)�_options� )�TwistOptionsc @ sJ e Zd ZdZd@dd�Zd@dd�Zd@dd �Zd@d
d�Zd@dd
�Zd@dd�Z d@dd�Z
d@dd�Zd@dd�Zd@dd�Z
d@dd�Zdededdfdd�Zd@dd�Zd@d d!�Zd@d"d#�Zd@d$d%�Zd&ed'eegef ddfd(d)�Zd@d*d+�Zd@d,d-�Zd@d.d/�Zd@d0d1�Zd@d2d3�Zd@d4d5�Zd@d6d7�Zd@d8d9�Z d@d:d;�Z!d@d<d=�Z"d@d>d?�Z#dS )A�OptionsTestsz$
Tests for L{TwistOptions}.
�returnNc C s t � | _| �td| j� dS )zX
Patch L{_twist.exit} so we can capture usage and prevent actual exits.
�exitN)r r �patchr ��self� r! �M/usr/lib/python3/dist-packages/twisted/application/twist/test/test_options.py� patchExit$ s zOptionsTests.patchExitc s8 g � _ ddtdtt dtf� fdd�
}� �td|� dS ) zZ
Patch L{_options.open} so we can capture usage and prevent actual opens.
N�name�moder c s( | dkr
t d d | ��� j�| |f� tS )N� nocanopen)�OSError�opened�append�NotImplemented)r$ r% r r! r"