a
    –§»ab  ã                
   @   s–   d dl Z d dlZd dlmZ d dlZze ¡  W n: eyj Z z"dZe 	ej
ed�¡ W Y dZ[n
dZ[0 0 d dlmZ dd„ Zdd	d
„Zdd„ ZdS )é    N)ÚTestCasez+Failed to enable faulthandler due to:
{err})Úerr)Ú	customizec                 C   s   t  ¡ }| | ¡}|S )z$Discover test under a directory
    )ÚunittestZ
TestLoaderZdiscover)ZstartdirÚloaderÚsuite© r   úQ/home/yuhw/wc/pochoir/venv/lib/python3.9/site-packages/llvmlite/tests/__init__.pyÚdiscover_tests   s    
r
   é   c                 C   sJ   | du rt dƒ} |dur.ddl}|j|d�}nd}tj| |d|d�}|jS )a"  
    args
    ----
    - suite [TestSuite]
        A suite of all tests to run
    - xmloutput [str or None]
        Path of XML output directory (optional)
    - verbosity [int]
        Verbosity level of tests output

    Returns the TestResult object after running the test *suite*.
    Nzllvmlite.testsr   )ÚoutputF)r   Z
testRunnerÚexitÚ	verbosity)r
   Ú	xmlrunnerZXMLTestRunnerr   ÚmainÚresult)r   Z	xmloutputr   r   ÚrunnerÚprogr   r   r	   Ú	run_tests   s    
ÿr   c                  C   s    t ƒ } t |  ¡ rdnd¡ d S )Nr   r   )r   Úsysr   ZwasSuccessful)Úresr   r   r	   r   7   s    r   )NNr   )r   r   r   ÚfaulthandlerÚenableÚBaseExceptionÚeÚmsgÚwarningsÚwarnÚformatZllvmlite.testsr   r
   r   r   r   r   r   r	   Ú<module>   s   (	
