当前位置: 首页>>代码示例>>Python>>正文


Python st_common.list_test_cases方法代码示例

本文整理汇总了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 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:21,代码来源:test_RSA.py

示例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 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:20,代码来源:test_DSA.py

示例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) 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:5,代码来源:test_FortunaAccumulator.py

示例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) 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:5,代码来源:test_FortunaGenerator.py

示例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 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:6,代码来源:test_pkcs1_oaep.py

示例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 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:6,代码来源:test_pkcs1_15.py

示例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 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:8,代码来源:test_asn1.py

示例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) 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:5,代码来源:test_Counter.py

示例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) 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:5,代码来源:test_number.py

示例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 
开发者ID:adde88,项目名称:hostapd-mana,代码行数:7,代码来源:test_KDF.py


注:本文中的Crypto.SelfTest.st_common.list_test_cases方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。