()
| 580 | |
| 581 | |
| 582 | def test_table_from_rows_stream(): |
| 583 | class TestSchema(pw.Schema): |
| 584 | foo: int = pw.column_definition(primary_key=True) |
| 585 | bar: int |
| 586 | |
| 587 | rows = [ |
| 588 | (1, 2, 2, 1), |
| 589 | (1, 2, 4, -1), |
| 590 | (1, 3, 4, 1), |
| 591 | (4, 2, 4, 1), |
| 592 | ] |
| 593 | expected = T( |
| 594 | """ |
| 595 | foo | bar |
| 596 | 1 | 3 |
| 597 | 4 | 2 |
| 598 | """ |
| 599 | ).with_id_from(pw.this.foo) |
| 600 | |
| 601 | table = pw.debug.table_from_rows(schema=TestSchema, rows=rows, is_stream=True) |
| 602 | assert_table_equality(table, expected) |
| 603 | |
| 604 | |
| 605 | def test_table_from_rows(): |
nothing calls this directly
no test coverage detected