o
    ýÑÐb  ã                   @   sî   d Z ddlmZmZmZ ddlZddlZddlm  m	Z
 ej dg d¢¡dd„ ƒZej de d	¡d
hfe d¡d
hfe d¡dhfe d¡dhfe d¡dhfe d¡dhfe d¡eƒ fe d¡ddhfe d¡eƒ fg	¡dd„ ƒZdS )zUnit tests for the pylint checkers in :mod:`pylint.extensions.check_docs`,
in particular the parameter documentation checker `DocstringChecker`
é    )ÚdivisionÚprint_functionÚabsolute_importNzstring,count))Úabcr   )Ú r   )z  abcé   )z
  abcr   )z	   
  abcé   c                 C   s   t  | ¡|ks	J ‚dS )z&Test for pylint_plugin.ParamDocCheckerN)ÚutilsZspace_indentation)ÚstringÚcount© r   úk/var/www/secure340b-portal/env/lib/python3.10/site-packages/pylint/test/extensions/test_check_docs_utils.pyÚtest_space_indentation   s   	r   zraise_node,expectedz=
    def my_func():
        raise NotImplementedError #@
    ÚNotImplementedErrorzQ
    def my_func():
        raise NotImplementedError("Not implemented!") #@
    zo
    def my_func():
        try:
            fake_func()
        except RuntimeError:
            raise #@
    ÚRuntimeErrorz’
    def my_func():
        try:
            fake_func()
        except RuntimeError:
            if another_func():
                raise #@
    zÖ
    def my_func():
        try:
            fake_func()
        except RuntimeError:
            try:
                another_func()
                raise #@
            except NameError:
                pass
    zÁ
    def my_func():
        try:
            fake_func()
        except RuntimeError:
            try:
                another_func()
            except NameError:
                raise #@
    Ú	NameErrorzb
    def my_func():
        try:
            fake_func()
        except:
            raise #@
    z}
    def my_func():
        try:
            fake_func()
        except (RuntimeError, ValueError):
            raise #@
    Ú
ValueErrorz
    import not_a_module
    def my_func():
        try:
            fake_func()
        except not_a_module.Error:
            raise #@
    c                 C   s   t  | ¡}||ksJ ‚d S )N)r	   Zpossible_exc_types)Z
raise_nodeÚexpectedÚfoundr   r   r   Útest_exception!   s   
Nr   )Ú__doc__Ú
__future__r   r   r   ZpytestZastroidZ#pylint.extensions._check_docs_utilsÚ
extensionsZ_check_docs_utilsr	   ÚmarkZparametrizer   Zextract_nodeÚsetr   r   r   r   r   Ú<module>   sJ   
ýýúù	
ö	÷úúù½M