()
| 603 | |
| 604 | |
| 605 | def test_table_from_rows(): |
| 606 | class TestSchema(pw.Schema): |
| 607 | foo: int = pw.column_definition(primary_key=True) |
| 608 | bar: int |
| 609 | |
| 610 | rows = [ |
| 611 | (1, 2), |
| 612 | (2, 2), |
| 613 | (3, 3), |
| 614 | (4, 2), |
| 615 | ] |
| 616 | expected = T( |
| 617 | """ |
| 618 | foo | bar |
| 619 | 1 | 2 |
| 620 | 2 | 2 |
| 621 | 3 | 3 |
| 622 | 4 | 2 |
| 623 | """ |
| 624 | ).with_id_from(pw.this.foo) |
| 625 | |
| 626 | table = pw.debug.table_from_rows(schema=TestSchema, rows=rows, is_stream=False) |
| 627 | assert_table_equality(table, expected) |
nothing calls this directly
no test coverage detected