o
    tBhF                     @  s^   d Z ddlmZ ddlZddlZddlZddlZejej	e
ddZG dd dejZdS )z*Test cases that run tests as subprocesses.    )annotationsNz..c                   @  s*   e Zd ZeejdddddZdS )	TestExternalwinzrt tests don't work on windowsreturnNonec              
   C  s   g }t j }tjdkr|ddg7 }d||d< tjddg|t jt	dd	d
dd t j }d||d< tjtj
dddg|t jt	ddd}t j }dt jvrXd|d< tjtj
ddg|t jt	ddd}|dkrrtddS )z!Run C unit tests in a subprocess.darwinz-mmacosx-version-min=10.10z-stdlib=libc++ CPPFLAGSmakez
libgtest.amypycexternal
googletest)envcwdzsetup.py	build_extz	--inplacezlib-rtGTEST_COLORyesz-cz6import sys, test_capi; sys.exit(test_capi.run_tests())r   zmake test: C unit test failureN)osenvironcopysysplatformjoin
subprocess
check_callpathbase_dir
executablecallAssertionError)selfcppflagsr   status r#   o/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/mypyc/test/test_external.pytest_c_unit_test   s8   





zTestExternal.test_c_unit_testN)r   r   )	__name__
__module____qualname__unittestskipIfr   r   
startswithr%   r#   r#   r#   r$   r      s    r   )__doc__
__future__r   r   r   r   r)   r   r   dirname__file__r   TestCaser   r#   r#   r#   r$   <module>   s    