MCPcopy
hub / github.com/pathwaycom/pathway / test_table_from_rows

Function test_table_from_rows

python/pathway/tests/test_utils.py:605–627  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

603
604
605def 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)

Callers

nothing calls this directly

Calls 2

TFunction · 0.90
with_id_fromMethod · 0.80

Tested by

no test coverage detected