Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /opt/hc_python/lib/python3.12/site-packages/nose/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/hc_python/lib/python3.12/site-packages/nose/__pycache__/commands.cpython-312.pyc
�

���g����dZ	ddlmZddlmZmZmZmZmZddl	m
Z
ddlmZd�Z
Gd�de�Zy	#e$rd	xZZYy	wxYw)
a�
nosetests setuptools command
----------------------------

The easiest way to run tests with nose is to use the `nosetests` setuptools
command::

  python setup.py nosetests

This command has one *major* benefit over the standard `test` command: *all
nose plugins are supported*.

To configure the `nosetests` command, add a [nosetests] section to your
setup.cfg. The [nosetests] section can contain any command line arguments that
nosetests supports. The differences between issuing an option on the command
line and adding it to setup.cfg are:

* In setup.cfg, the -- prefix must be excluded
* In setup.cfg, command line flags that take no arguments must be given an
  argument flag (1, T or TRUE for active, 0, F or FALSE for inactive)

Here's an example [nosetests] setup.cfg section::

  [nosetests]
  verbosity=1
  detailed-errors=1
  with-coverage=1
  cover-package=nose
  debug=nose.loader
  pdb=1
  pdb-failures=1

If you commonly run nosetests with a large number of options, using
the nosetests setuptools command and configuring with setup.cfg can
make running your tests much less tedious. (Note that the same options
and format supported in setup.cfg are supported in all other config
files, and the nosetests script will also load config files.)

Another reason to run tests with the command is that the command will
install packages listed in your `tests_require`, as well as doing a
complete build of your package before running tests. For packages with
dependencies or that build C extensions, using the setuptools command
can be more convenient than building by hand and running the nosetests
script.

Bootstrapping
-------------

If you are distributing your project and want users to be able to run tests
without having to install nose themselves, add nose to the setup_requires
section of your setup()::

  setup(
      # ...
      setup_requires=['nose>=1.0']
      )

This will direct setuptools to download and activate nose during the setup
process, making the ``nosetests`` command available.

�)�Command)�Config�option_blacklist�user_config_files�flag�_bool)�TestProgram)�DefaultPluginManagerc�,�g}|jD]�}|jdddtvr�|jddd}|jdvr|dz}d}|jr|jddd}|j|||jxsdf���|S)zAconvert a optparse option list into a distutils option tuple listr�N��
store_true�store_false�=��)�option_list�
_long_optsr�action�_short_opts�append�help)�parser�opt_list�opt�	long_name�
short_names     �</opt/hc_python/lib/python3.12/site-packages/nose/commands.py�get_user_optionsrIs������%�%�C��~�~�a� ���$�(8�8�����q�)�!�"�-�I��z�z�!>�>�%��O�	��J����!�o�o�a�0���4�
��O�O�Y�
�C�H�H�N��C�D�&���c��eZdZdZee�e���Zej�Z	e
e	�Zd�Zd�Z
d�Zd�Zy)�	nosetestszRun unit tests using nosetests)�files�pluginsc���i|_|jjD]B}|jddd}|j	dd�}||j|<t||d��Dd|_y)zWcreate the member variables, but change hyphens to
            underscores
            rrN�-�_)�option_to_cmds�_nosetests__parserrr�replace�setattr�attr)�selfr�cmd_name�option_names    r�initialize_optionsznosetests.initialize_options`sl��
#%�D���}�}�0�0���>�>�!�,�Q�R�0��&�.�.�s�C�8��3;��#�#�K�0���k�4�0�	1�
�D�Ir c��y)znothing to do hereN�)r-s r�finalize_optionsznosetests.finalize_optionsms��r c	�:�t|jdd�r�|jd�}d|_|j	�|jd�}|j
}|jd�}||_|j	�|jd�}d|_|j	�n9|jd�|jd�}d|_|j	�|jjr/|jj|jj�|jjr/|jj|jj�|jd�}dd	|jg}t|jj��D]N\}}	|tvr�t||�}
|
��|j|j!|j#dd�|
���Pt%||j&�
�y
)zhensure tests are capable of being run, then
            run nose.main with a reconstructed argument list�use_2to3F�build_pyr�egg_info�	build_extrr"z--whereNr'r&)�argv�config)�getattr�distribution�get_finalized_command�inplace�run�	build_lib�egg_base�run_command�install_requires�fetch_build_eggs�
tests_require�listr(�itemsr�extend�cfgToArgr*r	�_nosetests__config)r-r6�bpy_cmd�
build_pathr7r8�ei_cmdr9r/r.�values           rr?z
nosetests.runqs����t�(�(�*�e�<� �5�5�j�A��#$�� ������4�4�Z�@��$�.�.�
� �5�5�j�A��$.��!����� �6�6�{�C�	�$%�	�!��
�
��� � ��,�!�6�6�{�C�	�$%�	�!��
�
��� � �1�1��!�!�2�2��%�%�6�6�8�� � �.�.��!�!�2�2��%�%�3�3�5��/�/�
�;�F���F�O�O�<�D�+/��0C�0C�0I�0I�0K�+L�'��h��"2�2����k�2���$��K�K��
�
�k�&9�&9�#�s�&C�U�K�M�,M�
�T�$�-�-�8r c��g}d|z}|jj|�}|jdvr;t|�st	d|�d|�d���t|�r|j
|�|S|j||g�|S)Nz--r
zInvalid value 'z' for '�')r)�
get_optionrr�
ValueErrorrrrH)r-�optnamerNr9�long_optnamers      rrIznosetests.cfgToArg�s����D��'�>�L��-�-�*�*�<�8�C��z�z�:�:��E�{�$��w�&(�)�)���<��K�K��-��K����\�5�1�2��Kr N)�__name__�
__module__�__qualname__�descriptionrrr
rJ�	getParserr)r�user_optionsr0r3r?rIr2r rr"r"YsJ��6��� 1� 3�"6�"8�:���%�%�'��'��1��	�	�-	9�^	r r"N)�__doc__�
setuptoolsr�nose.configrrrrr�	nose.corer	�nose.pluginsr
rr"�ImportErrorr2r r�<module>rasR��<�zn�"���%�1�
� S�G�S��3����G�i��s�3�	?�?

ZeroDay Forums Mini