o
    tBh	                     @  s   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mZmZmZmZmZmZmZ g d
ZG dd deZdS )zTest cases for IR generation.    )annotationsN)CompileError)test_temp_dir)DataDrivenTestCase)TOP_LEVEL_NAME)format_func)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)zirbuild-basic.testzirbuild-int.testzirbuild-lists.testzirbuild-tuple.testzirbuild-dict.testzirbuild-set.testzirbuild-str.testzirbuild-bytes.testzirbuild-statements.testzirbuild-nested.testzirbuild-classes.testzirbuild-optional.testzirbuild-any.testzirbuild-generics.testzirbuild-try.testzirbuild-strip-asserts.testzirbuild-vectorcall.testzirbuild-unreachable.testzirbuild-isinstance.testzirbuild-dunders.testzirbuild-singledispatch.testzirbuild-constant-fold.testc                   @  s"   e Zd ZeZeZdZd	ddZdS )

TestGenOpsTtestcaser   returnNonec           	      C  s   t |j}|du rdS ttj| jt|S t|j	}t
|}|j}zt|j|}W n ty@ } z	|j}W Y d}~nd}~ww g }|D ]}|jtkrR|dsRqE|t| qEt||d| W d   dS 1 slw   Y  dS )z4Perform a runtime checking transformation test case.N	_toplevelzInvalid source code output)r   namer   ospathjoindata_prefixr   r   outputr   r   inputr   messagesr   endswithextendr   r
   )	selfr   optionsexpected_outputr   ireactualfn r&   n/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/mypyc/test/test_irbuild.pyrun_case6   s(   

"zTestGenOps.run_caseN)r   r   r   r   )__name__
__module____qualname__filesr   	base_pathoptional_outr(   r&   r&   r&   r'   r   1   s
    r   )__doc__
__future__r   os.pathr   mypy.errorsr   mypy.test.configr   mypy.test.datar   mypyc.commonr   mypyc.ir.pprintr   mypyc.test.testutilr   r	   r
   r   r   r   r   r   r,   r   r&   r&   r&   r'   <module>   s    (