
    i/                         S r SSKJr  SSKJr  \R                  r\R
                  r\R                  r " S S\R                  5      r\	S:X  a  \R                  " 5         gg)z!Tests for fire docstrings module.    )
docstrings)	testutilsc                       \ rS rSrS rS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rS rS rS rS rS rSrg)DocstringsTest   c                 h    Sn[         R                  " U5      n[        SS9nU R                  X25        g )NA simple one line docstring.summaryr   parseDocstringInfoassertEqualself	docstringdocstring_infoexpected_docstring_infos       T/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/fire/docstrings_test.pytest_one_line_simple#DocstringsTest.test_one_line_simple   s6    2I%%i0N+. 	,=    c                 h    Sn[         R                  " U5      n[        SS9nU R                  X25        g )Nz(
      A simple one line docstring.
    r	   r
   r   r   s       r   test_one_line_simple_whitespace.DocstringsTest.test_one_line_simple_whitespace%   s:    I  %%i0N+. 	,=r   c                 h    Sn[         R                  " U5      n[        SS9nU R                  X25        g )NzA one line docstring that is both a little too verbose and a little too long so it keeps going well beyond a reasonable length for a one-liner.
    zA one line docstring that is both a little too verbose and a little too long so it keeps going well beyond a reasonable length for a one-liner.r
   r   r   s       r   test_one_line_too_long%DocstringsTest.test_one_line_too_long/   s<    I  %%i0N+
 	,=r   c                 h    Sn[         R                  " U5      n[        SS9nU R                  X25        g )NztA one line docstring that is both a little too verbose and a little too long
    so it runs onto a second line.
    kA one line docstring that is both a little too verbose and a little too long so it runs onto a second line.r
   r   r   s       r   test_one_line_runs_over&DocstringsTest.test_one_line_runs_over<   s<    I  %%i0N+; 	,=r   c                 h    Sn[         R                  " U5      n[        SS9nU R                  X25        g )Nz}
      A one line docstring that is both a little too verbose and a little too long
      so it runs onto a second line.
    r    r
   r   r   s       r   "test_one_line_runs_over_whitespace1DocstringsTest.test_one_line_runs_over_whitespaceI   s<    I  %%i0N+; 	,=r   c           	          Sn[         R                  " U5      n[        S[        SSS9[        SSS9/S9nU R	                  X25        g )	Nz_One line description.

    Args:
      arg1: arg1_description
      arg2: arg2_description
    zOne line description.arg1arg1_descriptionnamedescriptionarg2arg2_descriptionr   argsr   r   r   ArgInfor   r   s       r   test_google_format_args_only+DocstringsTest.test_google_format_args_onlyU   sU    I  %%i0N+'-?@-?@
 	,=r   c                 z    Sn[         R                  " U5      n[        [        SSS9/S9nU R	                  X25        g )Nz+
    Args:
      args: arg_description
    r/   arg_descriptionr)   )r/   r0   r   s       r   !test_google_format_arg_named_args0DocstringsTest.test_google_format_arg_named_argsf   sG    I  %%i0N+->?

 	,=r   c                     Sn[         R                  " U5      n[        SS[        SSSS9[        SS	S
S9/SS9nU R	                  X25        g )Na*  Docstring summary.

    This is a longer description of the docstring. It spans multiple lines, as
    is allowed.

    Args:
        param1 (int): The first parameter.
        param2 (str): The second parameter.

    Returns:
        bool: The return value. True for success, False otherwise.
    Docstring summary.VThis is a longer description of the docstring. It spans multiple lines, as
is allowed.param1intThe first parameter.r*   typer+   param2strThe second parameter.z:bool: The return value. True for success, False otherwise.r   r+   r/   returnsr0   r   s       r   )test_google_format_typed_args_and_returns8DocstringsTest.test_google_format_typed_args_and_returnss   sj    I  %%i0N+$*  68 79
 M 	,=r   c                     Sn[         R                  " U5      n[        SS[        SSSS9[        SS	S
S9/S9nU R	                  X25        g )Na  Docstring summary.

    This is a longer description of the docstring. It spans multiple lines, as
    is allowed.

    Args:
        param1 (int): The first parameter.
        param2 (str): The second parameter. This has a lot of text, enough to
        cover two lines.
    r9   r:   r;   r<   r=   r>   r@   rA   HThe second parameter. This has a lot of text, enough to cover two lines.r   r+   r/   r0   r   s       r   ,test_google_format_multiline_arg_description;DocstringsTest.test_google_format_multiline_arg_description   sf    	I  %%i0N+$*  68!=>
	 	,=r   c                     Sn[         R                  " U5      n[        SS[        SSSS9[        SS	S
S9/SSS9nU R	                  X25        g )NaD  Docstring summary.

    This is a longer description of the docstring. It spans across multiple
    lines.

    :param arg1: Description of arg1.
    :type arg1: str.
    :param arg2: Description of arg2.
    :type arg2: bool.
    :returns:  int -- description of the return value.
    :raises: AttributeError, KeyError
    r9   NThis is a longer description of the docstring. It spans across multiple
lines.r'   rA   Description of arg1.r>   r,   boolDescription of arg2.z'int -- description of the return value.zAttributeError, KeyError)r   r+   r/   rD   raisesr0   r   s       r   &test_rst_format_typed_args_and_returns5DocstringsTest.test_rst_format_typed_args_and_returns   sl    I  %%i0N+$" e 68f 68
 :) 	,=r   c                     Sn[         R                  " U5      n[        SS[        SSSS9[        SS	S
S9/SS9nU R	                  X25        g )Na:  Docstring summary.

    This is a longer description of the docstring. It spans across multiple
    lines.

    Parameters
    ----------
    param1 : int
        The first parameter.
    param2 : str
        The second parameter.

    Returns
    -------
    bool
        True if successful, False otherwise.
    r9   rM   r;   r<   r=   r>   r@   rA   rB   z)bool True if successful, False otherwise.rC   r0   r   s       r   (test_numpy_format_typed_args_and_returns7DocstringsTest.test_numpy_format_typed_args_and_returns   si    I"  %%i0N+$"  68 79
 < 	,=r   c                     Sn[         R                  " U5      n[        SS[        SSSS9[        SS	S
S9/S9nU R	                  X25        g )Na&  Docstring summary.

    This is a longer description of the docstring. It spans across multiple
    lines.

    Parameters
    ----------
    param1 : int
        The first parameter.
    param2 : str
        The second parameter. This has a lot of text, enough to cover two
        lines.
    r9   rM   r;   r<   r=   r>   r@   rA   rH   rI   r0   r   s       r   +test_numpy_format_multiline_arg_description:DocstringsTest.test_numpy_format_multiline_arg_description   sf    I  %%i0N+$"  68!=>
	 	,=r   c                 j    Sn[         R                  " U5      n[        SSS9nU R                  X25        g )NzDocstring summary.

    This is the first section of a docstring description.

    This is the second section of a docstring description. This docstring
    description has just two sections.
    r9   zThis is the first section of a docstring description.

This is the second section of a docstring description. This docstring
description has just two sections.)r   r+   r   r   s       r   test_multisection_docstring*DocstringsTest.test_multisection_docstring  s?    I  %%i0N+$- 	,=r   c                 l    Sn[         R                  " U5      nU R                  SUR                  5        g )NztInspired by requests HTTPAdapter docstring.

    :param x: Simple param.

    Usage:

      >>> import requests
    z+Inspired by requests HTTPAdapter docstring.)r   r   r   r   )r   r   r   s      r   )test_google_section_with_blank_first_line8DocstringsTest.test_google_section_with_blank_first_line  s5    I  %%i0NB#++-r   c                 4    Sn[         R                  " U5        g )NzDocstring summary.

    args: raises ::
    :
    pathological docstrings should not fail, and ideally should behave
    reasonably.
    )r   r   )r   r   s     r   test_ill_formed_docstring(DocstringsTest.test_ill_formed_docstring%  s    I Yr   c                 ^    / SQnS/nU R                  U[        R                  " U5      5        g )N)     foo  rd   re   )r   r   _strip_blank_lines)r   linesexpected_outputs      r   test_strip_blank_lines%DocstringsTest.test_strip_blank_lines/  s)    %E kO_j&C&CE&JKr   c                     Sn[         R                  " U5      n[        SS [        SSSS9[        SSS	S9[        S
SS S9/S9nU R	                  X25        g )Nz
     Greets name.

     Arguments
     ---------
     name : str
         name, default : World
     arg2 : int
         arg2, default:None
     arg3 : bool
     zGreets name.r*   rA   zname, default : Worldr>   r,   r<   zarg2, default:Nonearg3rO   rI   r0   r   s       r   test_numpy_colon_in_description.DocstringsTest.test_numpy_colon_in_description5  sl    
	I  %%i0N+e 79e 46f$?

 	,=r   c                     Sn[         R                  " U5      n[        S[        SSSS9[	        SSS	S9[	        S
SSS9/S9nU R                  X25        g )NzDocstring summary.

    :param arg1: Description of arg1.
    :type arg1: str.
    :key arg2: Description of arg2.
    :type arg2: bool.
    :key arg3: Description of arg3.
    :type arg3: str.
    r9   r'   rA   rN   r>   r,   rO   rP   rl   zDescription of arg3.r.   )r   r   r   r1   	KwargInfor   r   s       r   %test_rst_format_typed_args_and_kwargs4DocstringsTest.test_rst_format_typed_args_and_kwargsO  sl    I  %%i0N+$e 686"8:6"8:

 	,=r    N)__name__
__module____qualname____firstlineno__r   r   r   r!   r$   r2   r6   rE   rJ   rR   rU   rX   r[   r^   ra   ri   rm   rq   __static_attributes__rs   r   r   r   r      s^    >>>>
>>">>8>4>: >D>:>&- L>4>r   r   __main__N)__doc__firer   r   r   r1   rp   BaseTestCaser   rt   mainrs   r   r   <module>r~      sa    (   ((


  	J>Y++ J>Z
 z.. r   