Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/p/y/PyDO-2.0.1/tests/test_dbi.py   PyDO(Download)
def test_autocommit1():
    db=D.getConnection('pydotest')
    if config.DRIVER=='mysql':
        assert db.autocommit
    else:

src/p/y/PyDO-2.0.1/tests/test_base.py   PyDO(Download)
 
    finally:
        if db.autocommit or config.DRIVER == "sqlite2":
            c.execute('drop table test_guess_columns1')
        else:
    def cleanup(self):
        if self.db.autocommit or config.DRIVER == "sqlite2":
            c=self.db.cursor()
            c.execute('DROP TABLE test_new1')
            c.close()
    def run(self):
        if config.DRIVER == 'sqlite2':
          self.B.updateSome(dict(x=2000), "x < ?", 500)
        else:
          self.B.updateSome(dict(x=2000), "x < %s", 500)
    def run(self):
        tmp=self.ac1.getF(P.NE(P.FIELD('a_id'), 2))
        assert len(tmp)==4
        if config.DRIVER == "sqlite2":
          tmp=self.ac1.getF("a_id > ?", 100)
        c=self.D.getCount()
        assert c == 20
        if config.DRIVER == "sqlite2":
          c=self.D.getCount("x < ?", 3)
        else:

src/p/y/PyDO-2.0.1/tests/fixture.py   PyDO(Download)
def get_sequence_sql():
    return dict(sqlite='INTEGER PRIMARY KEY NOT NULL',
                sqlite2='INTEGER PRIMARY KEY NOT NULL',
                psycopg='SERIAL PRIMARY KEY',
                mysql='INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY')[config.DRIVER]
    def cleanup(self):
        #
        # sqlite2 transactions won't rollback table creation; only data
        #
        if self.db.autocommit or config.DRIVER == "sqlite2":