Back to index

python3.2  3.2.2
Public Member Functions
sqlite3.test.dbapi.ClosedCurTests Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def CheckClosed

Detailed Description

Definition at line 840 of file dbapi.py.


Member Function Documentation

Definition at line 847 of file dbapi.py.

00847 
00848     def CheckClosed(self):
00849         con = sqlite.connect(":memory:")
00850         cur = con.cursor()
00851         cur.close()
00852 
00853         for method_name in ("execute", "executemany", "executescript", "fetchall", "fetchmany", "fetchone"):
00854             if method_name in ("execute", "executescript"):
00855                 params = ("select 4 union select 5",)
00856             elif method_name == "executemany":
00857                 params = ("insert into foo(bar) values (?)", [(3,), (4,)])
00858             else:
00859                 params = []
00860 
00861             try:
00862                 method = getattr(cur, method_name)
00863 
00864                 method(*params)
00865                 self.fail("Should have raised a ProgrammingError: method " + method_name)
00866             except sqlite.ProgrammingError:
00867                 pass
00868             except:
00869                 self.fail("Should have raised a ProgrammingError: " + method_name)

Here is the call graph for this function:

Definition at line 841 of file dbapi.py.

00841 
00842     def setUp(self):
00843         pass

Here is the caller graph for this function:

Definition at line 844 of file dbapi.py.

00844 
00845     def tearDown(self):
00846         pass

Here is the caller graph for this function:


The documentation for this class was generated from the following file: