Back to index

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

List of all members.

Public Member Functions

def setUp
def tearDown
def CheckString
def CheckSmallInt
def CheckLargeInt
def CheckFloat
def CheckBlob
def CheckUnicodeExecute

Public Attributes

 con
 cur

Detailed Description

Definition at line 33 of file types.py.


Member Function Documentation

Definition at line 69 of file types.py.

00069 
00070     def CheckBlob(self):
00071         sample = b"Guglhupf"
00072         val = memoryview(sample)
00073         self.cur.execute("insert into test(b) values (?)", (val,))
00074         self.cur.execute("select b from test")
00075         row = self.cur.fetchone()
00076         self.assertEqual(row[0], sample)

Here is the call graph for this function:

Definition at line 62 of file types.py.

00062 
00063     def CheckFloat(self):
00064         val = 3.14
00065         self.cur.execute("insert into test(f) values (?)", (val,))
00066         self.cur.execute("select f from test")
00067         row = self.cur.fetchone()
00068         self.assertEqual(row[0], val)

Here is the call graph for this function:

Definition at line 55 of file types.py.

00055 
00056     def CheckLargeInt(self):
00057         num = 2**40
00058         self.cur.execute("insert into test(i) values (?)", (num,))
00059         self.cur.execute("select i from test")
00060         row = self.cur.fetchone()
00061         self.assertEqual(row[0], num)

Here is the call graph for this function:

Definition at line 49 of file types.py.

00049 
00050     def CheckSmallInt(self):
00051         self.cur.execute("insert into test(i) values (?)", (42,))
00052         self.cur.execute("select i from test")
00053         row = self.cur.fetchone()
00054         self.assertEqual(row[0], 42)

Here is the call graph for this function:

Definition at line 43 of file types.py.

00043 
00044     def CheckString(self):
00045         self.cur.execute("insert into test(s) values (?)", ("Österreich",))
00046         self.cur.execute("select s from test")
00047         row = self.cur.fetchone()
00048         self.assertEqual(row[0], "Österreich")

Here is the call graph for this function:

Definition at line 77 of file types.py.

00077 
00078     def CheckUnicodeExecute(self):
00079         self.cur.execute("select 'Österreich'")
00080         row = self.cur.fetchone()
00081         self.assertEqual(row[0], "Österreich")

Here is the call graph for this function:

Definition at line 34 of file types.py.

00034 
00035     def setUp(self):
00036         self.con = sqlite.connect(":memory:")
00037         self.cur = self.con.cursor()
00038         self.cur.execute("create table test(i integer, s varchar, f number, b blob)")

Here is the caller graph for this function:

Definition at line 39 of file types.py.

00039 
00040     def tearDown(self):
00041         self.cur.close()
00042         self.con.close()

Here is the caller graph for this function:


Member Data Documentation

Definition at line 35 of file types.py.

Definition at line 36 of file types.py.


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