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

Function test_ix

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

Source from the content-addressed store, hash-verified

303@pytest.mark.parametrize("append_only_2", [True, False])
304@pytest.mark.parametrize("allow_misses", [True, False])
305def test_ix(append_only_1, append_only_2, allow_misses):
306 class Schema1(pw.Schema, append_only=append_only_1):
307 a: pw.Pointer
308
309 class Schema2(pw.Schema, append_only=append_only_2):
310 b: int
311
312 table_1 = table_from_datasource(TestDataSource(schema=Schema1))
313 table_2 = table_from_datasource(TestDataSource(schema=Schema2))
314 result = table_1.select(b=table_2.ix(pw.this.a, allow_misses=allow_misses).b)
315
316 assert result._id_column.properties.append_only == append_only_1
317 assert result.b._column.properties.append_only == (
318 append_only_1 and append_only_2 and (not allow_misses)
319 )
320
321
322@pytest.mark.parametrize("append_only_1", [True, False])

Callers

nothing calls this directly

Calls 4

table_from_datasourceFunction · 0.90
TestDataSourceClass · 0.90
selectMethod · 0.45
ixMethod · 0.45

Tested by

no test coverage detected