
    i	                        d Z ddlmZ ddlZddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ dd	lmZ dd
lmZmZmZmZmZmZmZmZ ddlmZ ddlmZ ddlmZ ddl m!Z! ddl"m#Z#  G d de          Z$dS )z$Runner for lowering transform tests.    )annotationsN)CompileError)test_temp_dir)DataDrivenTestCase)TOP_LEVEL_NAME)format_func)CompilerOptions)ICODE_GEN_BUILTINSMypycDataSuiteassert_test_outputbuild_ir_for_single_file%infer_ir_build_options_from_test_nameremove_comment_linesreplace_word_sizeuse_custom_builtins)insert_exception_handling)do_flag_elimination)lower_ir)insert_ref_count_opcodes)insert_uninit_checksc                  "    e Zd ZddgZeZd	dZdS )
TestLoweringzlowering-int.testzlowering-list.testtestcaser   returnNonec                   t          |j                  }|d S t          t          j                            | j        t                    |          5  t          |j	                  }t          |          }	 t          |j        |          }g }|D ]}|j        t          k    r|j                            d          s-t          d          }t!          |d           t#          |d           t%          |           t'          ||           t)          ||           |                    t-          |                     n# t.          $ r}|j        }Y d }~nd }~ww xY wt3          ||d|           d d d            d S # 1 swxY w Y   d S )N	_toplevelT)strict_traceback_checkszInvalid source code output)r   namer   ospathjoindata_prefixr
   r   outputr   r   inputr   endswithr	   r   r   r   r   r   extendr   r   messagesr   )selfr   optionsexpected_outputiractualfnes           W/root/projects/qq-shell/venv/lib64/python3.11/site-packages/mypyc/test/test_lowering.pyrun_casezTestLowering.run_case"   s   7FF?F d.>@R!S!SU]^^ 	` 	`28?CCO/@@O3-hngFF  3 3Bw.009O9OP[9\9\0 -dKKKG )T222-b$777,R000R)))'G444MM+b//22223	   $ $ $$" x1M___-	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	`s=   $E<6D?B4E<?
E	EE<EE<<F F N)r   r   r   r   )__name__
__module____qualname__filesr   	base_pathr1        r0   r   r      s>         "67EI` ` ` ` ` `r8   r   )%__doc__
__future__r   os.pathr    mypy.errorsr   mypy.test.configr   mypy.test.datar   mypyc.commonr   mypyc.ir.pprintr   mypyc.optionsr	   mypyc.test.testutilr
   r   r   r   r   r   r   r   mypyc.transform.exceptionsr    mypyc.transform.flag_eliminationr   mypyc.transform.lowerr   mypyc.transform.refcountr   mypyc.transform.uninitr   r   r7   r8   r0   <module>rH      s   * * " " " " " "  $ $ $ $ $ $ * * * * * * - - - - - - ' ' ' ' ' ' ' ' ' ' ' ' ) ) ) ) ) )	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 A @ @ @ @ @ @ @ @ @ @ @ * * * * * * = = = = = = 7 7 7 7 7 7` ` ` ` `> ` ` ` ` `r8   