| 262 | |
| 263 | @dataclass |
| 264 | class Checker: |
| 265 | error: AssertionError | None = None |
| 266 | |
| 267 | def __call__(self) -> bool: |
| 268 | if not output_path.exists(): |
| 269 | return False |
| 270 | try: |
| 271 | G.clear() |
| 272 | result = pw.io.csv.read(output_path, schema=OutputSchema, mode="static") |
| 273 | expected = pw.debug.table_from_markdown( |
| 274 | """ |
| 275 | res |
| 276 | abab |
| 277 | defx |
| 278 | defdef |
| 279 | xx |
| 280 | xdef |
| 281 | """ |
| 282 | ) |
| 283 | assert_table_equality_wo_index(result, expected) |
| 284 | return True |
| 285 | except AssertionError as e: |
| 286 | self.error = e |
| 287 | return False |
| 288 | |
| 289 | def provide_information_on_failure(self) -> str: |
| 290 | return str(self.error) |
| 291 | |
| 292 | wait_result_with_checker( |
| 293 | Checker(), |
no outgoing calls