()
| 61 | |
| 62 | @pytest.fixture(scope="session") |
| 63 | def csv_5mb(): |
| 64 | import mimesis |
| 65 | |
| 66 | buf, chunks = None, [] |
| 67 | limit = 5 * 1024 * 1024 |
| 68 | while sys.getsizeof(buf) <= limit: |
| 69 | g = mimesis.Generic() |
| 70 | chunk = "\n".join( |
| 71 | (f"{g.person.full_name()},{g.person.email()}" for _ in range(10000)) |
| 72 | ) |
| 73 | chunks.append(chunk) |
| 74 | buf = "".join(chunks) |
| 75 | |
| 76 | yield buf[len(chunk) : limit] |
nothing calls this directly
no test coverage detected
searching dependent graphs…