
    IR-e)                     0    d dl Z d dlZd dlZd dlmZ d ZdS )    N)make_function_with_signaturec                  <   d } t          | d          }d                                }	  |dd           t          j        d           d	S # t          $ rF t          j                    \  }}}|t          u sJ t          j	        |          }d|d         v sJ Y d	S w xY w)
z
    Tests that a function made with ``make_function_with_signature`` is give
    the correct line number into the module it was created from (i.e. the line
    ``make_function_with_signature`` was called from).
    c                      ddz   d S )N   r    )argskwargss     @lib/python3.11/site-packages/astropy/utils/tests/test_codegen.pycrashy_functionzAtest_make_function_with_signature_lineno.<locals>.crashy_function   s    	A    )abzM
    wrapped = make_function_with_signature(crashy_function, ('a', 'b'))
    r      z$This should have caused an exceptionz1 / 0N)
r   strippytestfail	Exceptionsysexc_infoZeroDivisionError	traceback	format_tb)r   wrappedlineexc_clsexctbtb_liness          r
   (test_make_function_with_signature_linenor       s       +?JGGG 	<1 	:;;;;;  ' ' '<>>b+++++ &r**(2,&&&&&&&'s   A ABB)r   r   r   astropy.utils.codegenr   r    r   r   r
   <module>r"      sP    


      > > > > > >< < < < <r   