Skip to content

Commit e3a52db

Browse files
committed
Updated cursor test for more coverage
1 parent 706b72d commit e3a52db

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/nuodb_cursor_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ def test_cursor_description(self):
2323
self.assertEquals(descriptions[1][1], self.driver.NUMBER)
2424
self.assertEquals(descriptions[1][2], 11)
2525

26-
def test_cursor_rowcount_select(self):
26+
def test_cursor_rowcount_and_last_query(self):
2727
con = self._connect()
2828
cursor = con.cursor()
29-
30-
cursor.execute("SELECT 1 FROM DUAL UNION ALL SELECT 2 FROM DUAL")
29+
statement = "SELECT 1 FROM DUAL UNION ALL SELECT 2 FROM DUAL"
30+
cursor.execute(statement)
3131
self.assertEquals(cursor.rowcount, -1)
32+
self.assertEquals(cursor.query, statement)
3233

3334
def test_insufficient_parameters(self):
3435
con = self._connect()

0 commit comments

Comments
 (0)