MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / test_issue_13

Method test_issue_13

pymysql/tests/test_issues.py:94–111  ·  view source on GitHub ↗

can't handle large result fields

(self)

Source from the content-addressed store, hash-verified

92 c.execute("drop table test")
93
94 def test_issue_13(self):
95 """can't handle large result fields"""
96 conn = self.connect()
97 cur = conn.cursor()
98 with warnings.catch_warnings():
99 warnings.filterwarnings("ignore")
100 cur.execute("drop table if exists issue13")
101 try:
102 cur.execute("create table issue13 (t text)")
103 # ticket says 18k
104 size = 18 * 1024
105 cur.execute("insert into issue13 (t) values (%s)", ("x" * size,))
106 cur.execute("select t from issue13")
107 # use assertTrue so that obscenely huge error messages don't print
108 r = cur.fetchone()[0]
109 self.assertTrue("x" * size == r)
110 finally:
111 cur.execute("drop table issue13")
112
113 def test_issue_15(self):
114 """query should be expanded before perform character encoding"""

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