當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。