Current File : //usr/lib64/python2.7/site-packages/Crypto/SelfTest/__init__.pyc
�
Bd\Rc@s�dZdZddlZddlZddlmZdefd��YZdddddd�Zid	�Z	e
d
kr�d�Zejdd
�ndS(sgSelf tests

These tests should perform quickly and can ideally be used every time an
application runs.
s$Id$i����N(tStringIOt
SelfTestErrorcBseZd�ZRS(cCs)tj|||�||_||_dS(N(t	Exceptiont__init__tmessagetresult(tselfRR((s>/usr/lib64/python2.7/site-packages/Crypto/SelfTest/__init__.pyR&s	(t__name__t
__module__R(((s>/usr/lib64/python2.7/site-packages/Crypto/SelfTest/__init__.pyR%sic	Ks|dkri}ntj�}|dkr[|dkrKtd|�}n|j|�n4|dkr�|j|jd|��ntd��|dkr�t�|d<ntjd||�}|j|�}|j	�s|dkrt
jj|j
��ntd|��n|S(s6Execute self-tests.

    This raises SelfTestError if any test is unsuccessful.

    You may optionally pass in a sub-module of SelfTest if you only want to
    perform some of the tests.  For example, the following would test only the
    hash modules:

        Crypto.SelfTest.run(Crypto.SelfTest.Hash)

    tconfigs5'module' and 'tests' arguments are mutually exclusivetstreamt	verbositysSelf-test failedN(tNonetunittestt	TestSuitet	get_teststaddTestst
ValueErrorRtTextTestRunnertrunt
wasSuccessfultsyststderrtwritetgetvalueR(	tmoduleRR
ttestsR	tkwargstsuitetrunnerR((s>/usr/lib64/python2.7/site-packages/Crypto/SelfTest/__init__.pyR+s&	c	Csg}ddlm}||jd|�7}ddlm}||jd|�7}ddlm}||jd|�7}ddlm}||jd|�7}ddlm}||jd|�7}ddlm}||jd|�7}dd	lm}||jd|�7}|S(
Ni����(tCipherR	(tHash(tProtocol(t	PublicKey(tRandom(tUtil(t	Signature(	tCrypto.SelfTestRRRR R!R"R#R$(	R	RRRR R!R"R#R$((s>/usr/lib64/python2.7/site-packages/Crypto/SelfTest/__init__.pyRMs t__main__cCstjt��S(N(R
RR(((s>/usr/lib64/python2.7/site-packages/Crypto/SelfTest/__init__.pyt<lambda>YstdefaultTestR(
t__doc__t__revision__RR
RRRRRRRRtmain(((s>/usr/lib64/python2.7/site-packages/Crypto/SelfTest/__init__.pyt<module>s"