66
66
67
67
68
68
class DatabaseAPI20Test (unittest .TestCase ):
69
- """ Test a database self.driver for DB API 2.0 compatibility.
70
- This implementation tests Gadfly, but the TestCase
71
- is structured so that other self.drivers can subclass this
72
- test case to ensure compiliance with the DB-API. It is
73
- expected that this TestCase may be expanded in the future
74
- if ambiguities or edge conditions are discovered.
69
+ """Test a database self.driver for DB API 2.0 compatibility.
70
+ This implementation tests Gadfly, but the TestCase
71
+ is structured so that other self.drivers can subclass this
72
+ test case to ensure compiliance with the DB-API. It is
73
+ expected that this TestCase may be expanded in the future
74
+ if ambiguities or edge conditions are discovered.
75
75
76
- The 'Optional Extensions' are not yet being tested.
76
+ The 'Optional Extensions' are not yet being tested.
77
77
78
- self.drivers should subclass this test, overriding setUp, tearDown,
79
- self.driver, connect_args and connect_kw_args. Class specification
80
- should be as follows:
78
+ self.drivers should subclass this test, overriding setUp, tearDown,
79
+ self.driver, connect_args and connect_kw_args. Class specification
80
+ should be as follows:
81
81
82
- import dbapi20
83
- class mytest(dbapi20.DatabaseAPI20Test):
84
- [...]
82
+ import dbapi20
83
+ class mytest(dbapi20.DatabaseAPI20Test):
84
+ [...]
85
85
86
- Don't 'import DatabaseAPI20Test from dbapi20', or you will
87
- confuse the unit tester - just 'import dbapi20'.
86
+ Don't 'import DatabaseAPI20Test from dbapi20', or you will
87
+ confuse the unit tester - just 'import dbapi20'.
88
88
"""
89
89
90
90
# The self.driver module. This should be the module where the 'connect'
@@ -110,15 +110,15 @@ def executeDDL2(self, cursor):
110
110
cursor .execute (self .ddl2 )
111
111
112
112
def setUp (self ):
113
- """ self.drivers should override this method to perform required setup
114
- if any is necessary, such as creating the database.
113
+ """self.drivers should override this method to perform required setup
114
+ if any is necessary, such as creating the database.
115
115
"""
116
116
pass
117
117
118
118
def tearDown (self ):
119
- """ self.drivers should override this method to perform required cleanup
120
- if any is necessary, such as deleting the test database.
121
- The default drops the tables that may be created.
119
+ """self.drivers should override this method to perform required cleanup
120
+ if any is necessary, such as deleting the test database.
121
+ The default drops the tables that may be created.
122
122
"""
123
123
con = self ._connect ()
124
124
try :
@@ -521,8 +521,8 @@ def test_fetchone(self):
521
521
]
522
522
523
523
def _populate (self ):
524
- """ Return a list of sql commands to setup the DB for the fetch
525
- tests.
524
+ """Return a list of sql commands to setup the DB for the fetch
525
+ tests.
526
526
"""
527
527
populate = [
528
528
"insert into {}booze values ('{}')" .format (self .table_prefix , s )
@@ -710,9 +710,9 @@ def test_mixedfetch(self):
710
710
con .close ()
711
711
712
712
def help_nextset_setUp (self , cur ):
713
- """ Should create a procedure called deleteme
714
- that returns two result sets, first the
715
- number of rows in booze then "name from booze"
713
+ """Should create a procedure called deleteme
714
+ that returns two result sets, first the
715
+ number of rows in booze then "name from booze"
716
716
"""
717
717
raise NotImplementedError ("Helper not implemented" )
718
718
# sql="""
0 commit comments