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

Method test_issue_175

pymysql/tests/test_issues.py:379–393  ·  view source on GitHub ↗

The number of fields returned by server is read in wrong way

(self)

Source from the content-addressed store, hash-verified

377 conn.close()
378
379 def test_issue_175(self):
380 """The number of fields returned by server is read in wrong way"""
381 conn = self.connect()
382 cur = conn.cursor()
383 for length in (200, 300):
384 columns = ", ".join(f"c{i} integer" for i in range(length))
385 sql = f"create table test_field_count ({columns})"
386 try:
387 cur.execute(sql)
388 cur.execute("select * from test_field_count")
389 assert len(cur.description) == length
390 finally:
391 with warnings.catch_warnings():
392 warnings.filterwarnings("ignore")
393 cur.execute("drop table if exists test_field_count")
394
395 def test_issue_321(self):
396 """Test iterable as query argument."""

Callers

nothing calls this directly

Calls 3

cursorMethod · 0.80
executeMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected