관리-도구
편집 파일: collect.cpython-37.pyc
B �fP) � @ sj d Z ddlmZ ddlmZ ddlZddlZe�e�Z G dd� de�Z G dd� d�ZG d d � d ej�ZdS )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 �E/opt/alt/python37/lib/python3.7/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�conf� suiteClass)r �loaderr r r �prepareTestLoader&