U
    Ęk7g  ć                   @   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 )zReturn 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   ś=/tmp/pip-unpacked-wheel-b6iq4o75/Crypto/SelfTest/st_common.pyŚlist_test_cases    s    r   c                 C   s2   t | trtd |  ” ”S td |  ” ”S dS )z,Remove whitespace from a text or byte stringŚ N)Ś
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   