The number of fields returned by server is read in wrong way
(self)
| 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.""" |