Repository URL to install this package:
|
Version:
4.2.1 ▾
|
U
B]5 ã @ sÞ d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
mZ ddl
mZ ddl
mZmZmZ ddlmZ ddl
mZ ddl
mZ dd l
mZ dd
l
mZ ddl
mZ ddl
mZ dd
l
mZ ddl
mZ G dd dejZG dd dejZG dd dejZG dd dejZG dd dejZ G dd dejZ!G dd dejZ"G dd dejZ#G dd d ejZ$G d!d" d"ejZ%G d#d$ d$ejZ&G d%d& d&ejZ'd'd( Z(e)d)krÚej*d(d* dS )+z!Test suite for supervisor.optionsé N)ÚStringIO)Úas_bytes)ÚMockÚsentinelÚpatch)ÚLevelsByName)ÚDummySupervisor)ÚDummyLogger)ÚDummyOptions)ÚDummyPoller)ÚDummyPConfig)ÚDummyProcess)ÚDummySocketConfig)Úlstripc @ s¶ e Zd Zdd Zd-ddZdd Zdd Zd
d Zdd
Zdd Z dd Z
dd Zdd Zdd Z
dd Zdd Zdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zd(d) Zd*d+ Zd,S ).ÚOptionTestsc C s ddl m} |S )Nr ©ÚOptions)Úsupervisor.optionsr )Úselfr © r ú,./build/lib/supervisor/tests/test_options.pyÚ_getTargetClass s zOptionTests._getTargetClassFc sf | ¡ ddlm} G fddd }| }t |_|jdddddd |jd
d
ddd
|d |S )Nr )Úintegerc s, e Zd ZddiZf fdd Zdd ZdS )z+OptionTests._makeOptions.<locals>.MyOptionsÚotheré) c s, || _ | ¡ G dd dt}| | _d S )Nc @ s e Zd ZdS )zAOptionTests._makeOptions.<locals>.MyOptions.__init__.<locals>.FooN©Ú__name__Ú
__module__Ú__qualname__r r r r ÚFoo- s r )Ú
read_errorÚ__init__ÚobjectÚ
configroot)r r r r r r r! * s
z4OptionTests._makeOptions.<locals>.MyOptions.__init__c S s4 | j rt| j | jj | j¡ | jj | j¡ d S ©N)r Ú
ValueErrorr# Ú__dict__ÚupdateZdefault_mapÚmaster)r Úfpr r r Úread_config0 s
z7OptionTests._makeOptions.<locals>.MyOptions.read_configN)r r r r( r! r* r ©r r r r Ú MyOptions' s
ÿr, ÚanoptionÚoZoptionÚdefault)ÚnameÚconfnameÚshortÚlongr/ r ÚOTHERzp:zother=)r0 r1 Úenvr2 r3 Úhandler)r Úsupervisor.datatypesr r Ú
configfileÚadd)r r r r, Úoptionsr r+ r Ú_makeOptions# s ÿ
ÿzOptionTests._makeOptionsc C s&