MCPcopy Index your code
hub / github.com/pathwaycom/pathway / test_update_rows_2

Function test_update_rows_2

python/pathway/tests/test_column_properties.py:499–516  ·  view source on GitHub ↗
(append_only_1, append_only_2, append_only_3, append_only_4)

Source from the content-addressed store, hash-verified

497@pytest.mark.parametrize("append_only_3", [True, False])
498@pytest.mark.parametrize("append_only_4", [True, False])
499def test_update_rows_2(append_only_1, append_only_2, append_only_3, append_only_4):
500 class Schema1(pw.Schema):
501 a: int = pw.column_definition(append_only=append_only_1)
502 b: int = pw.column_definition(append_only=append_only_2)
503
504 class Schema2(pw.Schema):
505 a: int = pw.column_definition(append_only=append_only_3)
506 b: int = pw.column_definition(append_only=append_only_4)
507
508 table_1 = table_from_datasource(TestDataSource(schema=Schema1))
509 table_2 = table_from_datasource(TestDataSource(schema=Schema2))
510 result = table_1.update_rows(table_2)
511
512 assert result._id_column.properties.append_only == (
513 (append_only_1 or append_only_2) and (append_only_3 or append_only_4)
514 )
515 assert not result.a._column.properties.append_only
516 assert not result.b._column.properties.append_only
517
518
519@pytest.mark.parametrize("append_only_1", [True, False])

Callers

nothing calls this directly

Calls 3

table_from_datasourceFunction · 0.90
TestDataSourceClass · 0.90
update_rowsMethod · 0.80

Tested by

no test coverage detected