def test_connection_gone_away(self):
        con = self.connections[0]
        cur = con.cursor()
        cur.execute("SET wait_timeout=1")
        time.sleep(2)
        with self.assertRaises(pymysql.OperationalError) as cm:
            cur.execute("SELECT 1+1")
        # error occures while reading, not writing because of socket buffer.
        #self.assertEqual(cm.exception.args[0], 2006)
        self.assertIn(cm.exception.args[0], (2006, 2013))
Download a file from UPLOAD_FOLDER
dataset/ETHPy150Open PyMySQL/PyMySQL/pymysql/tests/test_connection.py/TestConnection.test_connection_gone_away--crossover with--dataset/ETHPy150Open mosesschwartz/scrypture/scrypture/scrypture.py/download_file