Skip to content

Commit 5b42b45

Browse files
committed
SNOW-28072: Test case for PR#5: Fix error handling type lookup for cursor
1 parent 873f1b1 commit 5b42b45

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test_cursor.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,3 +883,13 @@ def test_fetch_before_execute(conn_testaccount):
883883
def test_close_twice(conn_testaccount):
884884
conn_testaccount.close()
885885
conn_testaccount.close()
886+
887+
888+
def test_fetch_out_of_range_timestamp_value(conn):
889+
with conn() as cnx:
890+
cur = cnx.cursor()
891+
cur.execute("""
892+
select '12345-01-02'::timestamp_ntz
893+
""")
894+
with pytest.raises(errors.InterfaceError):
895+
cur.fetchone()

0 commit comments

Comments
 (0)