NL i( dZddlmZddlZddlmZddlmZddl m Z ddl m Z m Z ddlmZdd lmZmZmZmZmZmZmZd gZGd d eZy) zBTest cases for annotating source code to highlight inefficiencies.) annotationsN) CompileError) test_temp_dir)DataDrivenTestCase)generate_annotations get_max_prio) format_func)ICODE_GEN_BUILTINSMypycDataSuiteassert_test_outputbuild_ir_for_single_file2%infer_ir_build_options_from_test_nameremove_comment_linesuse_custom_builtinszannotate-basic.testc eZdZeZeZdZddZy) TestReportTc$t|j}|yttjj |j t|5t|j}t|jD]F\}}d|vs |jddj}|jd|dzd|Hd} t|j|\}}} } t!d||| | } g} t#| j$j'd D]Q\} }t)|}|Dcgc]}|j*}}d j |}| jd| d|S t1|| d | dddycc}w#t,$r}|j.} Yd}~8d}~wwxYw#t2$rK|rGt5d |j6D]-}|jd k(rt9|D] }t5|/wxYw#1swYyxYw)z4Perform a runtime checking transformation test case.Nz# A:zmain:z: z native.pyc |dS)Nr)its ^/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/mypyc/test/test_annotate.pyz%TestReport.run_case..6s BqE)key zInvalid source code outputzGenerated IR: __top_level__)rnamerospathjoin data_prefixr routput enumerateinput rpartitionstripappendr rsortedritemsrmessagermessagesr BaseExceptionprint functionsr )selftestcaseoptionsexpected_outputilinemsgirtreetype_mapmapperractualline_num line_annsannsastr_annssefns rrun_casezTestReport.run_cases 7 F ?  d.>.>@R!SU] ^# 28??CO%X^^4 C4T>//&1!4::rWsBH"$*-=' ..r