Back to index

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

List of all members.

Public Member Functions

def setUp
def tearDown
def CheckClosedConCursor
def CheckClosedConCommit
def CheckClosedConRollback
def CheckClosedCurExecute
def CheckClosedCreateFunction
def CheckClosedCreateAggregate
def CheckClosedSetAuthorizer
def CheckClosedSetProgressCallback
def CheckClosedCall

Detailed Description

Definition at line 722 of file dbapi.py.


Member Function Documentation

Definition at line 829 of file dbapi.py.

00829 
00830     def CheckClosedCall(self):
00831         con = sqlite.connect(":memory:")
00832         con.close()
00833         try:
00834             con()
00835             self.fail("Should have raised a ProgrammingError")
00836         except sqlite.ProgrammingError:
00837             pass
00838         except:
00839             self.fail("Should have raised a ProgrammingError")

Here is the call graph for this function:

Definition at line 740 of file dbapi.py.

00740 
00741     def CheckClosedConCommit(self):
00742         con = sqlite.connect(":memory:")
00743         con.close()
00744         try:
00745             con.commit()
00746             self.fail("Should have raised a ProgrammingError")
00747         except sqlite.ProgrammingError:
00748             pass
00749         except:
00750             self.fail("Should have raised a ProgrammingError")

Here is the call graph for this function:

Definition at line 729 of file dbapi.py.

00729 
00730     def CheckClosedConCursor(self):
00731         con = sqlite.connect(":memory:")
00732         con.close()
00733         try:
00734             cur = con.cursor()
00735             self.fail("Should have raised a ProgrammingError")
00736         except sqlite.ProgrammingError:
00737             pass
00738         except:
00739             self.fail("Should have raised a ProgrammingError")

Here is the call graph for this function:

Definition at line 751 of file dbapi.py.

00751 
00752     def CheckClosedConRollback(self):
00753         con = sqlite.connect(":memory:")
00754         con.close()
00755         try:
00756             con.rollback()
00757             self.fail("Should have raised a ProgrammingError")
00758         except sqlite.ProgrammingError:
00759             pass
00760         except:
00761             self.fail("Should have raised a ProgrammingError")

Here is the call graph for this function:

Definition at line 786 of file dbapi.py.

00786 
00787     def CheckClosedCreateAggregate(self):
00788         con = sqlite.connect(":memory:")
00789         con.close()
00790         class Agg:
00791             def __init__(self):
00792                 pass
00793             def step(self, x):
00794                 pass
00795             def finalize(self):
00796                 return 17
00797         try:
00798             con.create_aggregate("foo", 1, Agg)
00799             self.fail("Should have raised a ProgrammingError")
00800         except sqlite.ProgrammingError:
00801             pass
00802         except:
00803             self.fail("Should have raised a ProgrammingError")

Here is the call graph for this function:

Definition at line 774 of file dbapi.py.

00774 
00775     def CheckClosedCreateFunction(self):
00776         con = sqlite.connect(":memory:")
00777         con.close()
00778         def f(x): return 17
00779         try:
00780             con.create_function("foo", 1, f)
00781             self.fail("Should have raised a ProgrammingError")
00782         except sqlite.ProgrammingError:
00783             pass
00784         except:
00785             self.fail("Should have raised a ProgrammingError")

Here is the call graph for this function:

Definition at line 762 of file dbapi.py.

00762 
00763     def CheckClosedCurExecute(self):
00764         con = sqlite.connect(":memory:")
00765         cur = con.cursor()
00766         con.close()
00767         try:
00768             cur.execute("select 4")
00769             self.fail("Should have raised a ProgrammingError")
00770         except sqlite.ProgrammingError:
00771             pass
00772         except:
00773             self.fail("Should have raised a ProgrammingError")

Here is the call graph for this function:

Definition at line 804 of file dbapi.py.

00804 
00805     def CheckClosedSetAuthorizer(self):
00806         con = sqlite.connect(":memory:")
00807         con.close()
00808         def authorizer(*args):
00809             return sqlite.DENY
00810         try:
00811             con.set_authorizer(authorizer)
00812             self.fail("Should have raised a ProgrammingError")
00813         except sqlite.ProgrammingError:
00814             pass
00815         except:
00816             self.fail("Should have raised a ProgrammingError")

Here is the call graph for this function:

Definition at line 817 of file dbapi.py.

00817 
00818     def CheckClosedSetProgressCallback(self):
00819         con = sqlite.connect(":memory:")
00820         con.close()
00821         def progress(): pass
00822         try:
00823             con.set_progress_handler(progress, 100)
00824             self.fail("Should have raised a ProgrammingError")
00825         except sqlite.ProgrammingError:
00826             pass
00827         except:
00828             self.fail("Should have raised a ProgrammingError")

Here is the call graph for this function:

Definition at line 723 of file dbapi.py.

00723 
00724     def setUp(self):
00725         pass

Here is the caller graph for this function:

Definition at line 726 of file dbapi.py.

00726 
00727     def tearDown(self):
00728         pass

Here is the caller graph for this function:


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