Пример #1
0
def get_tests(config={}):
    from Crypto.SelfTest.st_common import list_test_cases
    tests = list_test_cases(MiscTests)
    try:
        from Crypto.PublicKey import _fastmath
        tests += list_test_cases(FastmathTests)
    except ImportError:
        from Crypto.SelfTest.st_common import handle_fastmath_import_error
        handle_fastmath_import_error()
    return tests
Пример #2
0
def get_tests(config={}):
    from Crypto.SelfTest.st_common import list_test_cases
    tests = list_test_cases(MiscTests)
    try:
        from Crypto.PublicKey import _fastmath
        tests += list_test_cases(FastmathTests)
    except ImportError:
        from Crypto.SelfTest.st_common import handle_fastmath_import_error
        handle_fastmath_import_error()
    return tests
Пример #3
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(DSATest)
    try:
        from Crypto.PublicKey import _fastmath
        tests += list_test_cases(DSAFastMathTest)
    except ImportError:
        from Crypto.SelfTest.st_common import handle_fastmath_import_error
        handle_fastmath_import_error()
    tests += list_test_cases(DSASlowMathTest)
    return tests
Пример #4
0
def get_tests(config={}):
    tests = []
    tests += list_test_cases(RSATest)
    try:
        from Crypto.PublicKey import _fastmath
        tests += list_test_cases(RSAFastMathTest)
    except ImportError:
        from Crypto.SelfTest.st_common import handle_fastmath_import_error
        handle_fastmath_import_error()
    if config.get('slow_tests',1):
        tests += list_test_cases(RSASlowMathTest)
    return tests