관리-도구
편집 파일: config.cpython-37.pyc
B .�Se�b � @ s d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZm Z d dl mZ d dlm Z mZ e �e�ZddgZdd gZd Zededd � G dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�Zdd� Zdd� Zdd� Zdd� Z dS ) � N)�OptionParser)�absdir�tolist)� NoPlugins)�warn�filterwarnings�help�verbosez ~/.nosercz ~/nose.cfg)�win32�cli�alwaysz(.*\.)?nose\.config)�category�modulec @ s e Zd Zdd� ZdS )�NoSuchOptionErrorc C s t �| |� || _d S )N)� Exception�__init__�name)�selfr � r �</opt/alt/python37/lib/python3.7/site-packages/nose/config.pyr s zNoSuchOptionError.__init__N)�__name__� __module__�__qualname__r r r r r r s r c @ s e Zd ZdS )�ConfigErrorN)r r r r r r r r % s r c @ sR e Zd ZdZddd�Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� ZdS )�ConfiguredDefaultsOptionParserz@ Handler for options from commandline and config files. Nc s@ || _ || _� d kr| j j� � | _|d kr6� fdd�}|| _d S )Nc s � | �S )Nr )�msg�kw)�errorr r �<lambda>4 � z9ConfiguredDefaultsOptionParser.__init__.<locals>.<lambda>)�_parser�_config_sectionr �_error�_file_error)r �parserZconfig_sectionr � file_errorr )r r r - s z'ConfiguredDefaultsOptionParser.__init__c C s@ g }| j |�� kr<x(|�| j �D ]\}}|�|||f� q W |S )N)r! �sections�items�append)r �cfg�filename�configr �valuer r r � _configTuples7 s z,ConfiguredDefaultsOptionParser._configTuplesc C sx g }xn|D ]f}t �� }y|�|� W n8 t jk r\ } ztd|t|�f ��W d d }~X Y nX |�| �||�� q W |S )Nz Error reading config file %r: %s)�configparser�RawConfigParser�read�Errorr �str�extendr- )r � filenamesr+ r* r) �excr r r �_readFromFilenames>