File: //opt/alt/python37/lib/python3.7/site-packages/nose/__pycache__/loader.cpython-37.opt-1.pyc
B
9�`�c � @ s< d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z m
Z
ddlmZm
Z
ddlmZ ddlmZ ddlmZmZmZ dd lmZmZ dd
lmZmZmZmZmZmZm Z m!Z!m"Z"m#Z# ddl$m%Z%m&Z&m'Z' ddlm(Z(m)Z) e�*e+�Z,ej-j.Z/ej-j0Z1ej-j2Z3ej-j4Z5ej-j6Z7d
dgZ8G dd
� d
ej9�Z9e9Z:dS )z�
Test Loader
-----------
nose's test loader implements the same basic functionality as its
superclass, unittest.TestLoader, but extends it by more liberal
interpretations of what may be a test and how a test may be named.
� N)�
isfunction)�unbound_method�ismethod)�FunctionTestCase�MethodTestCase)�Failure)�Config)�Importer�add_path�remove_path)�defaultSelector�TestAddress)
�func_lineno�
getpackage�isclass�isgenerator� ispackage�regex_last_key�resolve_name�transplant_func�transplant_class�test_address)�ContextSuiteFactory�ContextList� LazySuite)� sort_list�
cmp_to_key�
TestLoader�defaultTestLoaderc s� e Zd ZdZdZdZdZdZdZd&dd�Z dd� Z
dd� Zd d
� Zdd� Z
d
d� Zdd� Zdd� Zd'dd�Zd(dd�Zd)dd�Z� fdd�Zdd� Zd*dd�Zd+d d!�Zd"d#� Zd$d%� Z� ZS ),r aA Test loader that extends unittest.TestLoader to:
* Load tests from test-like functions and classes that are not
unittest.TestCase subclasses
* Find and load test modules in a directory
* Support tests that are generators
* Support easy extensions of or changes to that behavior through plugins
Nc C s� |dkrt � }|dkr t|d�}|dkr.|j}|dkr@t|�}nt|�rP||�}|| _|| _tt|��| _|| _ |j
r�t||� t|d�| _
tg �| _tj�| � dS )a Initialize a test loader.
Parameters (all optional):
* config: provide a `nose.config.Config`_ or other config class
instance; if not provided a `nose.config.Config`_ with
default values is used.
* importer: provide an importer instance that implements
`importFromPath`. If not provided, a
`nose.importer.Importer`_ is used.
* workingDir: the directory to which file and module names are
relative. If not provided, assumed to be the current working
directory.
* selector: a selector class or instance. If a class is
provided, it will be instantiated with one argument, the
current config. If not provided, a `nose.selector.Selector`_
is used.
N)�config)r r �
workingDirr r r �importer�op_normpath�
op_abspath�selector�addPathsr
r �
suiteClass�set�
_visitedPaths�unittestr �__init__)�selfr r! r r$ � r, �</opt/alt/python37/lib/python3.7/site-packages/nose/loader.pyr* ; s&