Back to index

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

List of all members.

Public Member Functions

def convert
def setUp
def tearDown
def CheckBinaryInputForConverter

Public Attributes

 con

Static Public Attributes

tuple convert = staticmethod(convert)

Detailed Description

Definition at line 321 of file types.py.


Member Function Documentation

Definition at line 333 of file types.py.

00333 
00334     def CheckBinaryInputForConverter(self):
00335         testdata = b"abcdefg" * 10
00336         result = self.con.execute('select ? as "x [bin]"', (memoryview(zlib.compress(testdata)),)).fetchone()[0]
00337         self.assertEqual(testdata, result)

Here is the call graph for this function:

Definition at line 322 of file types.py.

00322 
00323     def convert(s):
        return zlib.decompress(s)

Definition at line 326 of file types.py.

00326 
00327     def setUp(self):
00328         self.con = sqlite.connect(":memory:", detect_types=sqlite.PARSE_COLNAMES)
00329         sqlite.register_converter("bin", BinaryConverterTests.convert)

Here is the caller graph for this function:

Definition at line 330 of file types.py.

00330 
00331     def tearDown(self):
00332         self.con.close()

Here is the caller graph for this function:


Member Data Documentation

Definition at line 327 of file types.py.

Definition at line 324 of file types.py.


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