관리-도구
편집 파일: suite.cpython-38.pyc
U )�e�W � @ sD d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl mZmZm Z ddlZejdkr�ejdd� d k r�ddlZe�d � ddlmZ nG dd � d e�Ze�e�Ze� Zdd� ZG dd� de�ZG dd� dej�ZG dd� de�ZG dd� de�Z G dd� de�Z!G dd� dej�Z"G dd� d�Z#G dd� d�Z$dS ) z� Test Suites ----------- Provides a LazySuite, which is a suite whose test list is a generator function, and ContextSuite,which can run fixtures (setup/teardown functions or methods) for the context that contains its tests. � N)�Test)�Config)�ResultProxyFactory)�isclass�resolve_name�try_run�cli� )r � � IronPython)�StringExceptionc @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r �8/opt/hc_python/lib/python3.8/site-packages/nose/suite.pyr s r c C s d| j | jf S )Nz%s.%s)r r )�clsr r r � _strclass% s r c @ s e Zd ZdZdS )�MixedContextErrorzQError raised when a context suite sees tests from more than one context. N)r r r �__doc__r r r r r ( s r c st e Zd ZdZd� fdd� Zdd� Zdd� Zd d � ZeZdd� Z d d� Z dd� Zdd� Zdd� Z eee dd�Z� ZS )� LazySuitez:A suite that may use a generator as its list of tests r c s t t| ��� | �|� dS )zFInitialize the suite. tests may be an iterable or a generator N)�superr �__init__� _set_tests)�self�tests�� __class__r r r 2 s zLazySuite.__init__c C s t | j�S �N)�iter�_tests�r r r r �__iter__8 s zLazySuite.__iter__c C s dt | j�t| �f S )Nz<%s tests=generator (%s)>)r r �idr! r r r �__repr__; s �zLazySuite.__repr__c C s t �| �S r ��object�__hash__r! r r r r'