o
    `qi™  ã                   @   sD   d Z ddlZddlZddlmZ dd„ Zdd„ Zdd	„ Zd
d„ ZdS )z%Common functions for SelfTest modulesé    N)Úbc                 C   s   t  ¡  | ¡S )zReturn a list of TestCase instances given a TestCase class

    This is useful when you have defined test* methods on your TestCase class.
    )ÚunittestZ
TestLoaderZloadTestsFromTestCase)Úclass_© r   ú`/home/app/PaddleOCR-VL/.venv_paddleocr/lib/python3.10/site-packages/Crypto/SelfTest/st_common.pyÚlist_test_cases    s   r   c                 C   s.   t | tƒrtd |  ¡ ¡ƒS tdƒ |  ¡ ¡S )z,Remove whitespace from a text or byte stringÚ )Ú
isinstanceÚstrr   ÚjoinÚsplit©Úsr   r   r   Ústrip_whitespace'   s   
r   c                 C   s   t  t| ƒ¡S )z2Convert hexadecimal to binary, ignoring whitespace)ÚbinasciiÚa2b_hexr   r   r   r   r   r   .   s   r   c                 C   s
   t  | ¡S )zConvert binary to hexadecimal)r   Úb2a_hexr   r   r   r   r   2   s   
r   )	Ú__doc__r   r   ZCrypto.Util.py3compatr   r   r   r   r   r   r   r   r   Ú<module>   s   