#NEWLINE# def makeSQLTests( base , suffix , globals ) : #NEWLINE# #INDENT# '\n    Make a test case for every db connector which can connect.\n\n    @param base: Base class for test case. Additional base classes\n                 will be a DBConnector subclass and unittest.TestCase\n    @param suffix: A suffix used to create test case names. Prefixes\n                   are defined in the DBConnector subclasses.\n    ' #NEWLINE# connectors = [ PySQLite2Connector , SQLite3Connector , PyPgSQLConnector , PsycopgConnector , MySQLConnector , FirebirdConnector ] #NEWLINE# tests = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for connclass in connectors : #NEWLINE# #INDENT# name = ( connclass . TEST_PREFIX + suffix ) #NEWLINE# class testcase ( connclass , base , unittest . TestCase ) : #NEWLINE# #INDENT# __module__ = connclass . __module__ #NEWLINE# #UNINDENT# testcase . __name__ = name #NEWLINE# if hasattr ( connclass , '__qualname__' ) : #NEWLINE# #INDENT# testcase . __qualname__ = '.' . join ( ( connclass . __qualname__ . split ( ) [ 0 : ( - 1 ) ] + [ name ] ) ) #NEWLINE# #UNINDENT# tests [ name ] = testcase #NEWLINE# #UNINDENT# globals . update ( connectors )