本文整理匯總了Python中Crypto.SelfTest.st_common.list_test_cases方法的典型用法代碼示例。如果您正苦於以下問題:Python st_common.list_test_cases方法的具體用法?Python st_common.list_test_cases怎麽用?Python st_common.list_test_cases使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Crypto.SelfTest.st_common
的用法示例。
在下文中一共展示了st_common.list_test_cases方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
tests = []
tests += list_test_cases(RSATest)
try:
from Crypto.PublicKey import _fastmath
tests += list_test_cases(RSAFastMathTest)
except ImportError:
from distutils.sysconfig import get_config_var
import inspect
_fm_path = os.path.normpath(os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
+"/../../PublicKey/_fastmath"+get_config_var("SO"))
if os.path.exists(_fm_path):
raise ImportError("While the _fastmath module exists, importing "+
"it failed. This may point to the gmp or mpir shared library "+
"not being in the path. _fastmath was found at "+_fm_path)
if config.get('slow_tests',1):
tests += list_test_cases(RSASlowMathTest)
return tests
示例2: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
tests = []
tests += list_test_cases(DSATest)
try:
from Crypto.PublicKey import _fastmath
tests += list_test_cases(DSAFastMathTest)
except ImportError:
from distutils.sysconfig import get_config_var
import inspect
_fm_path = os.path.normpath(os.path.dirname(os.path.abspath(
inspect.getfile(inspect.currentframe())))
+"/../../PublicKey/_fastmath"+get_config_var("SO"))
if os.path.exists(_fm_path):
raise ImportError("While the _fastmath module exists, importing "+
"it failed. This may point to the gmp or mpir shared library "+
"not being in the path. _fastmath was found at "+_fm_path)
tests += list_test_cases(DSASlowMathTest)
return tests
示例3: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
from Crypto.SelfTest.st_common import list_test_cases
return list_test_cases(FortunaAccumulatorTests)
示例4: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
from Crypto.SelfTest.st_common import list_test_cases
return list_test_cases(FortunaGeneratorTests)
示例5: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
tests = []
tests += list_test_cases(PKCS1_OAEP_Tests)
return tests
示例6: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
tests = []
tests += list_test_cases(PKCS1_15_Tests)
return tests
示例7: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
from Crypto.SelfTest.st_common import list_test_cases
listTests = []
listTests += list_test_cases(DerObjectTests)
listTests += list_test_cases(DerSequenceTests)
return listTests
示例8: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
from Crypto.SelfTest.st_common import list_test_cases
return list_test_cases(CounterTests)
示例9: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
from Crypto.SelfTest.st_common import list_test_cases
return list_test_cases(MiscTests)
示例10: get_tests
# 需要導入模塊: from Crypto.SelfTest import st_common [as 別名]
# 或者: from Crypto.SelfTest.st_common import list_test_cases [as 別名]
def get_tests(config={}):
tests = []
tests += list_test_cases(PBKDF1_Tests)
tests += list_test_cases(PBKDF2_Tests)
return tests