(conn, faker, fmt, fmt_out)
| 495 | @pytest.mark.parametrize("fmt", PyFormat) |
| 496 | @pytest.mark.parametrize("fmt_out", [pq.Format.TEXT, pq.Format.BINARY]) |
| 497 | def test_random(conn, faker, fmt, fmt_out): |
| 498 | faker.format = fmt |
| 499 | faker.choose_schema(ncols=20) |
| 500 | faker.make_records(50) |
| 501 | |
| 502 | with conn.cursor(binary=fmt_out) as cur: |
| 503 | cur.execute(faker.drop_stmt) |
| 504 | cur.execute(faker.create_stmt) |
| 505 | with faker.find_insert_problem(conn): |
| 506 | cur.executemany(faker.insert_stmt, faker.records) |
| 507 | |
| 508 | cur.execute(faker.select_stmt) |
| 509 | recs = cur.fetchall() |
| 510 | |
| 511 | for got, want in zip(recs, faker.records): |
| 512 | faker.assert_record(got, want) |
| 513 | |
| 514 | |
| 515 | class MyStr(str): |
nothing calls this directly
no test coverage detected