예제 #1
0
 def setUpClass(cls):
     try:
         cls.binder = Binder.factory(paramstyle=cls.paramstyle)
     except AttributeError as e:
         if "paramstyle" in str(e):
             logger.error("%s needs to have a paramstyle set" % (cls))
         raise
예제 #2
0
    def setUpClass(cls, subcls):

        try:
            subcls.cursor.execute(subcls.qry_drop)
        except subcls.OperationalError:
            pass

        try:
            subcls.cursor.execute(subcls.qry_create)
        except Exception as e:
            msg = "%s table creation exception %s. cursor:%s" \
                % (subcls, e, subcls.cursor)
            logger.error(msg)
            raise

        subcls.binder = Binder.factory(paramstyle=subcls.paramstyle)