mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
test: drop test table if exist
It might be a residue of a psycopg 3 test run in the same db.
This commit is contained in:
parent
c34bf2f2f9
commit
ba92a22bc9
|
@ -379,6 +379,12 @@ class CursorTests(ConnectingTestCase):
|
|||
@skip_before_postgres(8, 2)
|
||||
def test_rowcount_on_executemany_returning(self):
|
||||
cur = self.conn.cursor()
|
||||
try:
|
||||
cur.execute("drop table execmany")
|
||||
self.conn.commit()
|
||||
except psycopg2.DatabaseError:
|
||||
self.conn.rollback()
|
||||
|
||||
cur.execute("create table execmany(id serial primary key, data int)")
|
||||
cur.executemany(
|
||||
"insert into execmany (data) values (%s)",
|
||||
|
|
Loading…
Reference in New Issue
Block a user