def test_issue_95(self):
        """Leftover trailing OK packet for "CALL my_sp" queries"""
        conn = self.connect()
        cur = conn.cursor()
        with warnings.catch_warnings():
            warnings.filterwarnings("ignore")
            cur.execute("DROP PROCEDURE IF EXISTS `foo`")
        cur.execute(
            """CREATE PROCEDURE `foo` ()
        BEGIN
            SELECT 1;
        END"""
        )
        try:
            cur.execute("""CALL foo()""")
            cur.execute("""SELECT 1""")
            self.assertEqual(cur.fetchone()[0], 1)
        finally:
            with warnings.catch_warnings():
                warnings.filterwarnings("ignore")
                cur.execute("DROP PROCEDURE IF EXISTS `foo`")
Leftover trailing OK packet for "CALL my_sp" queries
pymysql/tests/test_issues.py