
    g                        d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlm	Z	m
Z
mZ d dlmZ  e	dd      d        Z e	e ej                  d      d	d
      d        Z e	edd      d        Z e	edd      d        Z e	edd      d        Z e	d      d        Zd Zd Zd Zd Zd Zd Zd Zd Zej:                  j=                  ej>                  d k7  d!"      d#        Z y)$    N)doc!_break_traceback_cycle_from_framedownload_tzdata_on_windows)disabled_gcfunc_aA)method	operationc                      y)zD
    This is the {method} method.

    It computes {operation}.
    N whatevers    L/var/www/openai/venv/lib/python3.12/site-packages/pyarrow/tests/test_util.pyr   r   !   s     	    zK
        Examples
        --------

        >>> func_b()
        B
        func_bBc                      y Nr   r   s    r   r   r   +   s     	r   func_cCc                      y)z7
    Examples
    --------

    >>> func_c()
    C
    Nr   r   s    r   r   r   =   s     	r   func_dDc                      y r   r   r   s    r   r   r   M       r   func_eEc                      y r   r   r   s    r   r   r   R   r   r   func_f)r	   c                      y)z
    This is the {method} method.

    {{ We can escape curly braces like this. }}

    Examples
    --------
    We should replace curly brace usage in doctests.

    >>> dict(x = "x", y = "y")
    >>> set((1, 2, 3))
    Nr   r   s    r   r   r   W   s     	r   c                  X    t        j                  d      } t        j                  | k(  sJ y )NzD
        This is the func_a method.

        It computes A.
        )textwrapdedentr   __doc__docstrs    r   test_docstring_formattingr'   h   )    __	F >>V###r   c                  X    t        j                  d      } t        j                  | k(  sJ y )Nz
        This is the func_b method.

        It computes B.

        Examples
        --------

        >>> func_b()
        B
        )r"   r#   r   r$   r%   s    r   test_docstring_concatenationr*   s   )    __
	F >>V###r   c                  X    t        j                  d      } t        j                  | k(  sJ y )Nz
        This is the func_c method.

        It computes C.

        Examples
        --------

        >>> func_c()
        C
        )r"   r#   r   r$   r%   s    r   test_docstring_appendr-      r+   r   c                  X    t        j                  d      } t        j                  | k(  sJ y )NzD
        This is the func_d method.

        It computes D.
        )r"   r#   r   r$   r%   s    r   %test_docstring_template_from_callabler/      r(   r   c                  X    t        j                  d      } t        j                  | k(  sJ y )NzD
        This is the func_e method.

        It computes E.
        )r"   r#   r   r$   r%   s    r   -test_inherit_docstring_template_from_callabler1      r(   r   c                  X    t        j                  d      } t        j                  | k(  sJ y )Nz
        This is the func_f method.

        { We can escape curly braces like this. }

        Examples
        --------
        We should replace curly brace usage in doctests.

        >>> dict(x = "x", y = "y")
        >>> set((1, 2, 3))
        )r"   r#   r   r$   r%   s    r   test_escaping_in_docstringr3      s)    __	F >>V###r   c                      t               } t        j                  t        j                         t	        j
                  |       S r   )setsignal	getsignalSIGINTweakrefref)objs    r   exhibit_signal_refcycler<      s,    
 %C
V]]#;;sr   c                  j   t               5  t               }  |        t        j                  d       d d d        t	        j
                          t               5  t               }  |        J t        t        j                  d              |        J 	 d d d        y # 1 sw Y   lxY w# 1 sw Y   y xY w)Nz6Python version does not have the bug we're testing forr   )	r   r<   pytestskipgccollectr   sys	_getframe)wrs    r   test_signal_refcyclerE      s    	$&4<KKHJ 
 JJL	$&t)#--*:;t||	 
 
 
s   'B;B)B&)B2win32z&Timezone database is already provided.)reasonc                  .   t         j                  j                  d      } t         j                  j                  |       rt	        j
                  |        t                t         j                  j                  |       sJ t         j                  j                  t         j                  j                  | d            sJ t         j                  j                  t         j                  j                  | d            sJ dt        j                  |       v sJ y )Nz%USERPROFILE%\Downloads\tzdatazwindowsZones.xmleuropeversion)	ospath
expandvarsexistsshutilrmtreer   joinlistdir)tzdata_paths    r   test_download_tzdata_on_windowsrT      s     ''$$%FGK 	{#k"  77>>+&&&77>>"'',,{4FGHHH77>>"'',,{H=>>>

;////r   )!r@   rK   r6   rO   rB   r"   r9   r>   pyarrow.utilr   r   r   pyarrow.tests.utilr   r   r#   r   r   r   r   r   r'   r*   r-   r/   r1   r3   r<   rE   markskipifplatformrT   r   r   r   <module>rZ      sS  $ 
 	   
   6 6 * H$	 %	 
HOO	 		 

	
	 VH,	 -	 VH,	 -	 H	 	 $$"$"$$$$  CLLG+C  E0E0r   