MCPcopy Index your code
hub / github.com/PyMySQL/PyMySQL / test_largedata

Method test_largedata

pymysql/tests/test_connection.py:461–470  ·  view source on GitHub ↗

Large query and response (>=16MB)

(self)

Source from the content-addressed store, hash-verified

459 self.assertEqual(con.encoding, "utf8")
460
461 def test_largedata(self):
462 """Large query and response (>=16MB)"""
463 cur = self.connect().cursor()
464 cur.execute("SELECT @@max_allowed_packet")
465 if cur.fetchone()[0] < 16 * 1024 * 1024 + 10:
466 print("Set max_allowed_packet to bigger than 17MB")
467 return
468 t = "a" * (16 * 1024 * 1024)
469 cur.execute("SELECT '" + t + "'")
470 assert cur.fetchone()[0] == t
471
472 def test_autocommit(self):
473 con = self.connect()

Callers

nothing calls this directly

Calls 4

cursorMethod · 0.80
executeMethod · 0.80
connectMethod · 0.45
fetchoneMethod · 0.45

Tested by

no test coverage detected