Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add callproc test

  • Loading branch information...
commit bbe3d153b00547d5019b2742fad2d436aa815ace 1 parent 8650dfe
Hajime Nakagami authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 tests/tests.py
13 tests/tests.py
View
@@ -46,6 +46,15 @@ def debug_print(msg):
CONSTRAINT CHECK_A CHECK (a <> 0)
)
''')
+ conn.cursor().execute('''
+ CREATE PROCEDURE foo_proc (param_a INTEGER, param_b VARCHAR(30))
+ RETURNS (ret_a INTEGER, ret_b VARCHAR(30))
+ AS
+ BEGIN
+ ret_a = param_a;
+ ret_b = param_b;
+ END
+ ''')
conn.commit()
cur = conn.cursor()
@@ -54,6 +63,10 @@ def debug_print(msg):
cur.close()
cur = conn.cursor()
+ print(cur.callproc("foo_proc", (1, "ABC")))
+ cur.close()
+
+ cur = conn.cursor()
cur.execute("select a as alias_name from foo")
assert cur.description[0][0] == 'ALIAS_NAME'
cur.close()
Please sign in to comment.
Something went wrong with that request. Please try again.