Edit File: test_options.cpython-36.pyc
3 �k�`�3 � @ 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� dej�ZG dd� dej�ZG dd� dej�ZG dd� dej�ZG dd� dej�Z G dd� dej�Z!G dd� dej�Z"G dd� dej�Z#G dd � d ej�Z$G d!d"� d"ej�Z%G d#d$� d$ej�Z&G d%d&� d&ej�Z'd'd(� Z(e)d)k�r�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-dd�Zdd� 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 �"/usr/lib/python3.6/test_options.py�_getTargetClass s zOptionTests._getTargetClassFc sf | j � � ddlm} G � �fdd�d� �}|� }t� |_|jdddddd � |jd d ddd |d� |S )Nr )�integerc s, e Zd ZddiZ�f� fdd� Zdd� ZdS )z+OptionTests._makeOptions.<locals>.MyOptions�other�) c s, || _ � j| � 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 ��| jjj| j� | jjj| 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'