can't handle large result fields
(self)
| 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""" |