
    sh@                     ~    S SK r S SKrS SKJr  S SKJr  S SKJr   " S S\5      r\	S:X  a  \ R                  " 5         gg)    Nnjit)TestCase)get_func_body_first_linenoc                   Z    \ 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)TestFirstLineFinder	   zv
The following methods contains tests that are sensitive to the source
locations w.r.t. the beginning of each method.
c                     [         R                  " 5       n[         R                  " U5      nUS   R                  R                  $ )N   )inspectcurrentframegetouterframesframef_code)selfr   caller_frames      t/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/numba/tests/test_firstlinefinder.py_get_grandparent_caller_code0TestFirstLineFinder._get_grandparent_caller_code   s6    $$&--e4A$$+++    c                 d    U R                  5       nUR                  nU R                  XU-   5        g N)r   co_firstlinenoassertEqual)r   expectedoffset_from_callergrandparent_colnos        r   assert_line_location(TestFirstLineFinder.assert_line_location   s/    ::<++);#;<r   c                 V    [         S 5       n[        U5      nU R                  US5        g )Nc                      gN    r%   r   r   fooBTestFirstLineFinder.test_decorated_odd_comment_indent.<locals>.foo   s     r      r   r   r   r   r&   first_def_lines      r   !test_decorated_odd_comment_indent5TestFirstLineFinder.test_decorated_odd_comment_indent   s0    		 
	 4C8!!.!4r   c                 V    S n[        [        U5      5      nU R                  US5        g )Nc                      gr#   r%   r%   r   r   r&   DTestFirstLineFinder.test_undecorated_odd_comment_indent.<locals>.foo#   s    r      )r   r   r   r*   s      r   #test_undecorated_odd_comment_indent7TestFirstLineFinder.test_undecorated_odd_comment_indent"   s'    	 4DI>!!.!4r   c                 T    S n[        [        U5      5      nU R                  U5        g )Nc                      gr#   r%   r%   r   r   <lambda>9TestFirstLineFinder.test_unnamed_lambda.<locals>.<lambda>+   s    ar   )r   r   assertIsNoner*   s      r   test_unnamed_lambda'TestFirstLineFinder.test_unnamed_lambda*   s#    3DI>.)r   c                 R    S nU" 5       n[        U5      nU R                  US5        g )Nc                      [         S 5       n U $ )Nc                      gr#   r%   r%   r   r   r&   BTestFirstLineFinder.test_nested_function.<locals>.foo.<locals>.foo2   s     r   r   )r&   s    r   r&   5TestFirstLineFinder.test_nested_function.<locals>.foo1   s      Jr      )r   r   )r   r&   innerr+   s       r   test_nested_function(TestFirstLineFinder.test_nested_function0   s*    	 3E:!!.!4r   c                 V    [         S 5       n[        U5      nU R                  US5        g )Nc                      g r   r%   r%   r   r   r&   4TestFirstLineFinder.test_pass_statement.<locals>.foo>   s    r   r1   r)   r*   s      r   test_pass_statement'TestFirstLineFinder.test_pass_statement=   s0    		 
	 4C8!!.!4r   c                 d    Sn0 n[        X5        US   n[        U5      nU R                  U5        g )Nz$def foo():
            pass
        r&   )execr   r8   )r   sourceglobalnsr&   r+   s        r   test_string_eval$TestFirstLineFinder.test_string_evalE   s9     Vuo3C8.)r   c                 V    [         S 5       n[        U5      nU R                  US5        g )Nc                      g r   r%   r%   r   r   r&   :TestFirstLineFinder.test_single_line_function.<locals>.fooS   s    r   r   r)   r*   s      r   test_single_line_function-TestFirstLineFinder.test_single_line_functionR   s*    	 
3C8!!.!4r   c                 V    [         S 5       n[        U5      nU R                  US5        g )Nc                      gzDocstring
            Nr%   r%   r   r   r&   /TestFirstLineFinder.test_docstring.<locals>.fooZ   s     r   r@   r)   r*   s      r   test_docstring"TestFirstLineFinder.test_docstringY   s0    		 
	
 4C8!!.!4r   c                 V    [         S 5       n[        U5      nU R                  US5        g )Nc                       grV   r%   r%   r   r   r&   1TestFirstLineFinder.test_docstring_2.<locals>.food   s
    r   r@   r)   r*   s      r   test_docstring_2$TestFirstLineFinder.test_docstring_2c   s0    		 
	 4C8!!.!4r   r%   N)__name__
__module____qualname____firstlineno____doc__r   r   r,   r2   r9   rB   rG   rM   rR   rX   r]   __static_attributes__r%   r   r   r   r   	   s>    
,
=
55*55*555r   r   __main__)unittestr   numbar   numba.tests.supportr   numba.misc.firstlinefinderr   r   r_   mainr%   r   r   <module>rk      s;       ( Ae5( e5P zMMO r   