
    9i                     <    S r SSKrSSKrSSKJr  S rS rS rS rg)z%Common functions for SelfTest modules    N)bc                 J    [         R                  " 5       R                  U 5      $ )zReturn a list of TestCase instances given a TestCase class

This is useful when you have defined test* methods on your TestCase class.
)unittest
TestLoaderloadTestsFromTestCase)class_s    Y/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/Crypto/SelfTest/st_common.pylist_test_casesr
       s    
  66v>>    c                     [        U [        5      (       a(  [        SR                  U R	                  5       5      5      $ [        S5      R                  U R	                  5       5      $ )z,Remove whitespace from a text or byte string )
isinstancestrr   joinsplitss    r	   strip_whitespacer   '   sB    !C#$$uzz!'')$$r   c                 @    [         R                  " [        U 5      5      $ )z2Convert hexadecimal to binary, ignoring whitespace)binasciia2b_hexr   r   s    r	   r   r   .   s    ,Q/00r   c                 .    [         R                  " U 5      $ )zConvert binary to hexadecimal)r   b2a_hexr   s    r	   r   r   2   s     Ar   )	__doc__r   r   Crypto.Util.py3compatr   r
   r   r   r    r   r	   <module>r      s'   2 ,   #?%1r   