Skip to content

Commit 8836965

Browse files
committed
reverting the changes for one of the testcase
1 parent e7083b7 commit 8836965

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_004_cursor.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,12 @@ def test_longwvarchar(cursor, db_connection):
513513
expectedRows = 2
514514
# fetchone test
515515
cursor.execute("SELECT longwvarchar_column FROM #pytest_longwvarchar_test")
516-
row = cursor.fetchone()
517-
assert row[0] == "ABCDEFGHI", "SQL_LONGWVARCHAR parsing failed for fetchone"
516+
rows = []
517+
for i in range(0, expectedRows):
518+
rows.append(cursor.fetchone())
519+
assert cursor.fetchone() == None, "longwvarchar_column is expected to have only {} rows".format(expectedRows)
520+
assert rows[0] == ["ABCDEFGHI"], "SQL_LONGWVARCHAR parsing failed for fetchone - row 0"
521+
assert rows[1] == [None], "SQL_LONGWVARCHAR parsing failed for fetchone - row 1"
518522
# fetchall test
519523
cursor.execute("SELECT longwvarchar_column FROM #pytest_longwvarchar_test")
520524
rows = cursor.fetchall()

0 commit comments

Comments
 (0)