Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
sqlite3.test.types.ObjectAdaptationTests Class Reference

List of all members.

Public Member Functions

def cast
def setUp
def tearDown
def CheckCasterIsUsed

Public Attributes

 con
 cur

Static Public Attributes

tuple cast = staticmethod(cast)

Detailed Description

Definition at line 296 of file types.py.


Member Function Documentation

Definition at line 297 of file types.py.

00297 
00298     def cast(obj):
        return float(obj)

Definition at line 315 of file types.py.

00315 
00316     def CheckCasterIsUsed(self):
00317         self.cur.execute("select ?", (4,))
00318         val = self.cur.fetchone()[0]
00319         self.assertEqual(type(val), float)
00320 
@unittest.skipUnless(zlib, "requires zlib")

Here is the call graph for this function:

Definition at line 301 of file types.py.

00301 
00302     def setUp(self):
00303         self.con = sqlite.connect(":memory:")
00304         try:
00305             del sqlite.adapters[int]
00306         except:
00307             pass
00308         sqlite.register_adapter(int, ObjectAdaptationTests.cast)
00309         self.cur = self.con.cursor()

Here is the caller graph for this function:

Definition at line 310 of file types.py.

00310 
00311     def tearDown(self):
00312         del sqlite.adapters[(int, sqlite.PrepareProtocol)]
00313         self.cur.close()
00314         self.con.close()

Here is the caller graph for this function:


Member Data Documentation

Definition at line 299 of file types.py.

Definition at line 302 of file types.py.

Definition at line 308 of file types.py.


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