§
    ƒÛg@  ã                   ó„   — d dl Z d dlZd dlmZ d dlmZ d dlmZ  G d„ de¦  «        Ze	dk    r e j
        ¦   «          dS dS )é    N©Únjit)ÚTestCase)Úget_func_body_first_linenoc                   óT   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ ZdS )ÚTestFirstLineFinderz‚
    The following methods contains tests that are sensitive to the source
    locations w.r.t. the beginning of each method.
    c                 ót   — t          j        ¦   «         }t          j        |¦  «        }|d         j        j        S )Né   )ÚinspectÚcurrentframeÚgetouterframesÚframeÚf_code)Úselfr   Úcaller_frames      úV/granary/edev/quantum/lib/python3.11/site-packages/numba/tests/test_firstlinefinder.pyÚ_get_grandparent_caller_codez0TestFirstLineFinder._get_grandparent_caller_code   s0   € ÝÔ$Ñ&Ô&ˆÝÔ-¨eÑ4Ô4ˆØ˜AŒÔ$Ô+Ð+ó    c                 ón   — |                       ¦   «         }|j        }|                      |||z   ¦  «         d S ©N)r   Úco_firstlinenoÚassertEqual)r   ÚexpectedÚoffset_from_callerÚgrandparent_coÚlnos        r   Úassert_line_locationz(TestFirstLineFinder.assert_line_location   s=   € Ø×:Ò:Ñ<Ô<ˆØÔ+ˆØ×Ò˜ 3Ð);Ñ#;Ñ<Ô<Ð<Ð<Ð<r   c                 óp   — t           d„ ¦   «         }t          |¦  «        }|                      |d¦  «         d S )Nc                  ó   — dS ©Né   © r"   r   r   ÚfoozBTestFirstLineFinder.test_decorated_odd_comment_indent.<locals>.foo   s	   € ð �1r   é   ©r   r   r   ©r   r#   Úfirst_def_lines      r   Ú!test_decorated_odd_comment_indentz5TestFirstLineFinder.test_decorated_odd_comment_indent   sF   € Ý	ð	ð 	ñ 
Œð	õ 4°CÑ8Ô8ˆØ×!Ò! .°!Ñ4Ô4Ð4Ð4Ð4r   c                 óp   — d„ }t          t          |¦  «        ¦  «        }|                      |d¦  «         d S )Nc                  ó   — dS r    r"   r"   r   r   r#   zDTestFirstLineFinder.test_undecorated_odd_comment_indent.<locals>.foo#   s   € à�1r   é   )r   r   r   r&   s      r   Ú#test_undecorated_odd_comment_indentz7TestFirstLineFinder.test_undecorated_odd_comment_indent"   sB   € ð	ð 	ð 	õ 4µD¸±I´IÑ>Ô>ˆØ×!Ò! .°!Ñ4Ô4Ð4Ð4Ð4r   c                 ón   — d„ }t          t          |¦  «        ¦  «        }|                      |¦  «         d S )Nc                  ó   — dS r    r"   r"   r   r   ú<lambda>z9TestFirstLineFinder.test_unnamed_lambda.<locals>.<lambda>+   s   € �a€ r   )r   r   ÚassertIsNoner&   s      r   Útest_unnamed_lambdaz'TestFirstLineFinder.test_unnamed_lambda*   s6   € ØˆiˆÝ3µD¸±I´IÑ>Ô>ˆà×Ò˜.Ñ)Ô)Ð)Ð)Ð)r   c                 ój   — d„ } |¦   «         }t          |¦  «        }|                      |d¦  «         d S )Nc                  ó&   — t           d„ ¦   «         } | S )Nc                  ó   — dS r    r"   r"   r   r   r#   zBTestFirstLineFinder.test_nested_function.<locals>.foo.<locals>.foo2   s	   € ð �qr   r   )r#   s    r   r#   z5TestFirstLineFinder.test_nested_function.<locals>.foo1   s"   € Ýðð ñ ŒTðð ˆJr   é   )r   r   )r   r#   Úinnerr'   s       r   Útest_nested_functionz(TestFirstLineFinder.test_nested_function0   sG   € ð	ð 	ð 	ð �‘”ˆÝ3°EÑ:Ô:ˆØ×!Ò! .°!Ñ4Ô4Ð4Ð4Ð4r   c                 óp   — t           d„ ¦   «         }t          |¦  «        }|                      |d¦  «         d S )Nc                  ó   — d S r   r"   r"   r   r   r#   z4TestFirstLineFinder.test_pass_statement.<locals>.foo>   s   € àˆDr   r+   r%   r&   s      r   Útest_pass_statementz'TestFirstLineFinder.test_pass_statement=   sF   € Ý	ð	ð 	ñ 
Œð	õ 4°CÑ8Ô8ˆØ×!Ò! .°!Ñ4Ô4Ð4Ð4Ð4r   c                 ó†   — d}i }t          ||¦  «         |d         }t          |¦  «        }|                      |¦  «         d S )Nz$def foo():
            pass
        r#   )Úexecr   r0   )r   ÚsourceÚglobalnsr#   r'   s        r   Útest_string_evalz$TestFirstLineFinder.test_string_evalE   sP   € ðˆð ˆÝˆV�XÑÔÐØ�uŒoˆå3°CÑ8Ô8ˆà×Ò˜.Ñ)Ô)Ð)Ð)Ð)r   c                 óp   — t           d„ ¦   «         }t          |¦  «        }|                      |d¦  «         d S )Nc                  ó   — d S r   r"   r"   r   r   r#   z:TestFirstLineFinder.test_single_line_function.<locals>.fooS   s   € Ø�4r   r
   r%   r&   s      r   Útest_single_line_functionz-TestFirstLineFinder.test_single_line_functionR   s=   € Ý	Øˆñ 
ŒØå3°CÑ8Ô8ˆØ×!Ò! .°!Ñ4Ô4Ð4Ð4Ð4r   c                 óp   — t           d„ ¦   «         }t          |¦  «        }|                      |d¦  «         d S )Nc                  ó   — dS ©zDocstring
            Nr"   r"   r   r   r#   z/TestFirstLineFinder.test_docstring.<locals>.fooZ   s	   € ð ˆDr   r5   r%   r&   s      r   Útest_docstringz"TestFirstLineFinder.test_docstringY   sF   € Ý	ð	ð 	ñ 
Œð	õ
 4°CÑ8Ô8ˆØ×!Ò! .°!Ñ4Ô4Ð4Ð4Ð4r   c                 óp   — t           d„ ¦   «         }t          |¦  «        }|                      |d¦  «         d S )Nc                  ó   — 	 dS rE   r"   r"   r   r   r#   z1TestFirstLineFinder.test_docstring_2.<locals>.food   s   € ðàˆDr   r5   r%   r&   s      r   Útest_docstring_2z$TestFirstLineFinder.test_docstring_2c   sF   € Ý	ð	ð 	ñ 
Œð	õ 4°CÑ8Ô8ˆØ×!Ò! .°!Ñ4Ô4Ð4Ð4Ð4r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r(   r,   r1   r7   r:   r?   rB   rF   rI   r"   r   r   r   r   	   sÃ   € € € € € ðð ð
,ð ,ð ,ð
=ð =ð =ð
5ð 5ð 5ð5ð 5ð 5ð*ð *ð *ð5ð 5ð 5ð5ð 5ð 5ð*ð *ð *ð5ð 5ð 5ð5ð 5ð 5ð5ð 5ð 5ð 5ð 5r   r   Ú__main__)Úunittestr   Únumbar   Únumba.tests.supportr   Únumba.misc.firstlinefinderr   r   rJ   Úmainr"   r   r   ú<module>rT      s¦   ðØ €€€Ø €€€à Ð Ð Ð Ð Ð Ø (Ð (Ð (Ð (Ð (Ð (Ø AÐ AÐ AÐ AÐ AÐ Aðe5ð e5ð e5ð e5ð e5˜(ñ e5ô e5ð e5ðP ˆzÒÐØ€H„M�O„O€O€O€Oð Ðr   