Viewing 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"	
Back to Directory File Manager