Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Apr 24, 2024
1 parent 4901144 commit 82e0d26
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ def test_execute_fail(setup):
sqlutil.execute('create xtable;', **kw)


def test_nocommit():
conn = getconn()
def test_nocommit(setup):
kw, conn = setup
conn1 = getconn()
sqlutil.execute('create unlogged table sqlutil_test1 (a int)', conn=conn)
sqlutil.execute('insert into sqlutil_test1 values(1)', conn=conn)
sqlutil.execute('insert into sqlutil_test1 values(2)',
noCommit=True,
conn=conn)
conn=conn1)
cnt, = sqlutil.get('select count(*) from sqlutil_test1', conn=conn)
assert (cnt[0] == 1)
sqlutil.execute('drop table sqlutil_test1;', conn=conn)
Expand Down

0 comments on commit 82e0d26

Please sign in to comment.