@@ -250,6 +250,7 @@ def disabled_test_issue_54(self):
250
250
251
251
class TestGitHubIssues (base .PyMySQLTestCase ):
252
252
def test_issue_66 (self ):
253
+ """ 'Connection' object has no attribute 'insert_id' """
253
254
conn = self .connections [0 ]
254
255
c = conn .cursor ()
255
256
self .assertEqual (0 , conn .insert_id ())
@@ -262,32 +263,8 @@ def test_issue_66(self):
262
263
finally :
263
264
c .execute ("drop table issue66" )
264
265
265
- def test_issue_114 (self ):
266
- conn = pymysql .connect (charset = "utf8" , ** self .databases [0 ])
267
- conn .autocommit (False )
268
- c = conn .cursor ()
269
- c .execute ("""select @@autocommit;""" )
270
- self .assertFalse (c .fetchone ()[0 ])
271
- conn .close ()
272
- conn .ping ()
273
- c .execute ("""select @@autocommit;""" )
274
- self .assertFalse (c .fetchone ()[0 ])
275
- conn .close ()
276
-
277
- # Ensure autocommit() is still working
278
- conn = pymysql .connect (charset = "utf8" , ** self .databases [0 ])
279
- c = conn .cursor ()
280
- c .execute ("""select @@autocommit;""" )
281
- self .assertFalse (c .fetchone ()[0 ])
282
- conn .close ()
283
- conn .ping ()
284
- conn .autocommit (True )
285
- c .execute ("""select @@autocommit;""" )
286
- self .assertTrue (c .fetchone ()[0 ])
287
- conn .close ()
288
-
289
- def test_Duplicate_field (self ):
290
- '''#79'''
266
+ def test_issue_79 (self ):
267
+ """ Duplicate field overwrites the previous one in the result of DictCursor """
291
268
conn = self .connections [0 ]
292
269
c = conn .cursor (pymysql .cursors .DictCursor )
293
270
@@ -312,6 +289,7 @@ def test_Duplicate_field(self):
312
289
c .execute ("drop table b" )
313
290
314
291
def test_issue_95 (self ):
292
+ """ Leftover trailing OK packet for "CALL my_sp" queries """
315
293
conn = self .connections [0 ]
316
294
cur = conn .cursor ()
317
295
cur .execute ("DROP PROCEDURE IF EXISTS `foo`" )
@@ -326,6 +304,30 @@ def test_issue_95(self):
326
304
finally :
327
305
cur .execute ("DROP PROCEDURE IF EXISTS `foo`" )
328
306
307
+ def test_issue_114 (self ):
308
+ """ autocommit is not set after reconnecting with ping() """
309
+ conn = pymysql .connect (charset = "utf8" , ** self .databases [0 ])
310
+ conn .autocommit (False )
311
+ c = conn .cursor ()
312
+ c .execute ("""select @@autocommit;""" )
313
+ self .assertFalse (c .fetchone ()[0 ])
314
+ conn .close ()
315
+ conn .ping ()
316
+ c .execute ("""select @@autocommit;""" )
317
+ self .assertFalse (c .fetchone ()[0 ])
318
+ conn .close ()
319
+
320
+ # Ensure autocommit() is still working
321
+ conn = pymysql .connect (charset = "utf8" , ** self .databases [0 ])
322
+ c = conn .cursor ()
323
+ c .execute ("""select @@autocommit;""" )
324
+ self .assertFalse (c .fetchone ()[0 ])
325
+ conn .close ()
326
+ conn .ping ()
327
+ conn .autocommit (True )
328
+ c .execute ("""select @@autocommit;""" )
329
+ self .assertTrue (c .fetchone ()[0 ])
330
+ conn .close ()
329
331
330
332
331
333
__all__ = ["TestOldIssues" , "TestNewIssues" , "TestGitHubIssues" ]
0 commit comments