File tree 1 file changed +9
-1
lines changed 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ def test_connection_gone_away(self):
418
418
with self .assertRaises (pymysql .OperationalError ) as cm :
419
419
cur .execute ("SELECT 1+1" )
420
420
# error occures while reading, not writing because of socket buffer.
421
- #self.assertEquals (cm.exception.args[0], 2006)
421
+ #self.assertEqual (cm.exception.args[0], 2006)
422
422
self .assertIn (cm .exception .args [0 ], (2006 , 2013 ))
423
423
424
424
def test_init_command (self ):
@@ -566,3 +566,11 @@ def test_previous_cursor_not_closed(self):
566
566
cur2 = con .cursor ()
567
567
with self .assertRaises (pymysql .ProgrammingError ):
568
568
cur2 .execute ("SELECT 3" )
569
+
570
+ def test_commit_during_multi_result (self ):
571
+ con = self .connections [0 ]
572
+ cur = con .cursor ()
573
+ cur .execute ("SELECT 1; SELECT 2" )
574
+ con .commit ()
575
+ cur .execute ("SELECT 3" )
576
+ self .assertEqual (cur .fetchone ()[0 ], 3 )
You can’t perform that action at this time.
0 commit comments