Skip to content

Commit

Permalink
add callproc test
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Nov 19, 2011
1 parent bbe3d15 commit 693df31
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def debug_print(msg):
''')
conn.cursor().execute('''
CREATE PROCEDURE foo_proc (param_a INTEGER, param_b VARCHAR(30))
RETURNS (ret_a INTEGER, ret_b VARCHAR(30))
RETURNS (out1 INTEGER, out2 VARCHAR(30))
AS
BEGIN
ret_a = param_a;
ret_b = param_b;
out1 = param_a;
out2 = param_b;
END
''')
conn.commit()
Expand All @@ -63,6 +63,8 @@ def debug_print(msg):
cur.close()

cur = conn.cursor()
for r in cur.execute("select out1, out2 from foo_proc(?, ?)", (1, "ABC")):
print r
print(cur.callproc("foo_proc", (1, "ABC")))
cur.close()

Expand Down

0 comments on commit 693df31

Please sign in to comment.