Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Lib/sqlite3/test/dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,17 @@ def test_last_row_id_insert_o_r(self):
]
self.assertEqual(results, expected)

def test_column_count(self):
# Check that column count is updated correctly for cached statements
select = "select * from test"
res = self.cu.execute(select)
old_count = len(res.description)
# Add a new column and execute the cached select query again
self.cu.execute("alter table test add newcol")
res = self.cu.execute(select)
new_count = len(res.description)
self.assertEqual(new_count - old_count, 1)


class ThreadTests(unittest.TestCase):
def setUp(self):
Expand Down