#NEWLINE# def get_tests( config = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# tests = [ ] #NEWLINE# tests += list_test_cases ( DSATest ) #NEWLINE# try : #NEWLINE# #INDENT# from Crypto.PublicKey import _fastmath #NEWLINE# tests += list_test_cases ( DSAFastMathTest ) #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# from distutils.sysconfig import get_config_var #NEWLINE# import inspect #NEWLINE# _fm_path = os . path . normpath ( ( ( os . path . dirname ( os . path . abspath ( inspect . getfile ( inspect . currentframe ( ) ) ) ) + '/../../PublicKey/_fastmath' ) + get_config_var ( 'SO' ) ) ) #NEWLINE# if os . path . exists ( _fm_path ) : #NEWLINE# #INDENT# 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 ) ) #NEWLINE# #UNINDENT# #UNINDENT# tests += list_test_cases ( DSASlowMathTest ) #NEWLINE# return tests