◐ Shell
reader mode source ↗
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
13 changes: 13 additions & 0 deletions Doc/includes/sqlite3/blob.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
12 changes: 12 additions & 0 deletions Doc/includes/sqlite3/blob_with.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
75 changes: 75 additions & 0 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
@@ -301,6 +301,21 @@ Connection Objects
supplied, this must be a callable returning an instance of :class:`Cursor`
or its subclasses.

.. method:: commit()

This method commits the current transaction. If you don't call this method,
Expand Down Expand Up @@ -853,6 +868,66 @@ Exceptions
transactions turned off. It is a subclass of :exc:`DatabaseError`.


.. _sqlite3-types:

SQLite and Python types
Expand Down
254 changes: 250 additions & 4 deletions Lib/sqlite3/test/dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,177 @@ def CheckLastRowIDInsertOR(self):
self.assertEqual(results, expected)


class ThreadTests(unittest.TestCase):
def setUp(self):
self.con = sqlite.connect(":memory:")
Expand Up @@ -768,6 +939,15 @@ def CheckClosedCurExecute(self):
with self.assertRaises(sqlite.ProgrammingError):
cur.execute("select 4")

def CheckClosedCreateFunction(self):
con = sqlite.connect(":memory:")
con.close()
Expand Down @@ -921,6 +1101,69 @@ def CheckOnConflictReplace(self):
self.assertEqual(self.cu.fetchall(), [('Very different data!', 'foo')])


def suite():
module_suite = unittest.makeSuite(ModuleTests, "Check")
connection_suite = unittest.makeSuite(ConnectionTests, "Check")
Expand All @@ -931,11 +1174,14 @@ def suite():
closed_con_suite = unittest.makeSuite(ClosedConTests, "Check")
closed_cur_suite = unittest.makeSuite(ClosedCurTests, "Check")
on_conflict_suite = unittest.makeSuite(SqliteOnConflictTests, "Check")
return unittest.TestSuite((
module_suite, connection_suite, cursor_suite, thread_suite,
constructor_suite, ext_suite, closed_con_suite, closed_cur_suite,
on_conflict_suite,
))

def test():
runner = unittest.TextTestRunner()
Expand Down
Loading
Toggle all file notes Toggle all file annotations