NL i dZddlmZddlZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZdd lmZmZmZmZmZmZmZmZdd lmZdd lmZdd lmZddl m!Z!ddl"m#Z#GddeZ$y)z$Runner for lowering transform tests.) annotationsN) CompileError) test_temp_dir)DataDrivenTestCase)TOP_LEVEL_NAME) format_func)CompilerOptions)ICODE_GEN_BUILTINSMypycDataSuiteassert_test_outputbuild_ir_for_single_file%infer_ir_build_options_from_test_nameremove_comment_linesreplace_word_sizeuse_custom_builtins)insert_exception_handling)do_flag_elimination)lower_ir)insert_ref_count_opcodes)insert_uninit_checksc eZdZddgZeZddZy) TestLoweringzlowering-int.testzlowering-list.testct|j}|yttjj |j t|5t|j}t|} t|j|}g}|D]}|jtk(r|jjds2t}t!|t#|t%|t'||t)|||j+t-| t3||d|dddy#t.$r}|j0}Yd}~1d}~wwxYw#1swYyxYw)N _toplevelzInvalid source code output)rnamerospathjoin data_prefixr routputrr inputrendswithr rrrrrextendrrmessagesr )selftestcaseoptionsexpected_outputiractualfnes ^/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/mypyc/test/test_lowering.pyrun_casezTestLowering.run_case"s.7 F ?  d.>.>@R!SU] ^ `28??CO/@O 3-hnngF 3Bww.09O9OP[9\ -/G),-b1,R0R)'G4MM+b/2 3 x1M _- ` `   $ $  ` `s7!E3D6 B$E6 E? E EEEE!N)r&rreturnNone)__name__ __module__ __qualname__filesr base_pathr.r-rrs "6 7EI`r7r)%__doc__ __future__ros.pathr mypy.errorsrmypy.test.configrmypy.test.datar mypyc.commonrmypyc.ir.pprintr mypyc.optionsr mypyc.test.testutilr r r r rrrrmypyc.transform.exceptionsr mypyc.transform.flag_eliminationrmypyc.transform.lowerrmypyc.transform.refcountrmypyc.transform.uninitrrr6r7r-rGsO*"$*-'')   A@*=7`>`r7