관리-도구
편집 파일: collect.cpython-38.pyc
U )�eT � @ sr d Z ddlmZ ddlmZ ddlZddlZddlZe�e �Z G dd� de�ZG dd� d�ZG d d � d ej �Z dS )a This plugin bypasses the actual execution of tests, and instead just collects test names. Fixtures are also bypassed, so running nosetests with the collection plugin enabled should be very quick. This plugin is useful in combination with the testid plugin (``--with-id``). Run both together to get an indexed list of all tests, which will enable you to run individual tests by index number. This plugin is also useful for counting tests in a test suite, and making people watching your demo think all of your tests pass. � )�Plugin)�TestNc @ s0 e Zd ZdZdZdZdd� Zdd� Zdd � Zd S )�CollectOnlyzB Collect and output test names only, don't run any tests. zcollect-onlyZcollect_onlyc C s( |j dd| j|�d�d| �� d� dS )z&Register commandline options. z--collect-only� store_trueZNOSE_COLLECT_ONLYz&Enable collect-only: %s [COLLECT_ONLY])�action�dest�default�helpN)� add_option� enableOpt�getr )�self�parser�env� r �B/opt/hc_python/lib/python3.8/site-packages/nose/plugins/collect.py�options s ��zCollectOnly.optionsc C s t �d� t| j�|_dS )z8Install collect-only suite class in TestLoader. zPreparing test loaderN)�log�debug�TestSuiteFactory�confZ suiteClass)r �loaderr r r �prepareTestLoader'