
    X-Ph	                        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                      }t!          |           t#          |           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	_toplevelz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           X/var/www/html/test/jupyter/venv/lib/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 -//G ),,,-b111,R000R)))'G444MM+b//22223	   $ $ $$" x1M___-	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	`s=   $E86D;B0E8;
EEE8EE88E<?E<N)r   r   r   r   )__name__
__module____qualname__filesr   	base_pathr0        r/   r   r      s>         "67EI` ` ` ` ` `r7   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   r6   r7   r/   <module>rG      s   * * " " " " " "  $ $ $ $ $ $ * * * * * * - - - - - - ' ' ' ' ' ' ' ' ' ' ' ' ) ) ) ) ) )	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 A @ @ @ @ @ @ @ @ @ @ @ * * * * * * = = = = = = 7 7 7 7 7 7` ` ` ` `> ` ` ` ` `r7   