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

Function test_restrict

python/pathway/tests/test_column_properties.py:363–376  ·  view source on GitHub ↗
(append_only_1, append_only_2)

Source from the content-addressed store, hash-verified

361@pytest.mark.parametrize("append_only_1", [True, False])
362@pytest.mark.parametrize("append_only_2", [True, False])
363def test_restrict(append_only_1, append_only_2):
364 class Schema1(pw.Schema, append_only=append_only_1):
365 a: int
366
367 class Schema2(pw.Schema, append_only=append_only_2):
368 b: int
369
370 table_1 = table_from_datasource(TestDataSource(schema=Schema1))
371 table_2 = table_from_datasource(TestDataSource(schema=Schema2))
372 pw.universes.promise_is_subset_of(table_2, table_1)
373 result = table_1.restrict(table_2)
374
375 assert result._id_column.properties.append_only == (append_only_1 and append_only_2)
376 assert result.a._column.properties.append_only == (append_only_1 and append_only_2)
377
378
379@pytest.mark.parametrize("append_only_1", [True, False])

Callers

nothing calls this directly

Calls 3

table_from_datasourceFunction · 0.90
TestDataSourceClass · 0.90
restrictMethod · 0.80

Tested by

no test coverage detected