o
    2g}                     @   s.  d Z ddlZddlZg ZeeD ]-Zedr=eeeZze  W q e	y< Z
 zeee f W Y dZ
[
qdZ
[
ww qerddlmZmZ ddlZdd Zeedd d	Zedd
 D ]\ZZ
ede d ej  ee
  e  ej  q^eded
 d  d ej  ed
 d d dS )a  Default driver for run tests (run-*.test).

This imports the 'native' module (containing the compiled test cases)
and calls each function starting with test_, and reports any
exceptions as failures.

Test cases can provide a custom driver.py that overrides this file.
    Ntest_)print_exception	format_tbc                 C   s0   d t| }td|}|d u rdS |dS )N
z=File "(native|driver).py", line ([0-9]+), in (test_|<module>)0   )joinr   researchgroup)tb	formattedm r   U/home/garg/my-data/venv/lib/python3.10/site-packages/mypyc/test-data/driver/driver.pyextract_line   s
   
r   c                 C   s   t | d d S )Nr      )r   )er   r   r   <lambda>#   s    r   )keyz<< z >>r   )__doc__sysnativefailuresdirname
startswithgetattr	test_func	Exceptionr   appendexc_info	tracebackr   r   r	   r   sortedprintstdoutflushr   r   r   r   <module>   s:    	




