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

Function test_intersect

python/pathway/tests/test_persistence.py:414–428  ·  view source on GitHub ↗
(tmp_path, mode)

Source from the content-addressed store, hash-verified

412)
413@only_with_license_key("mode", [api.PersistenceMode.OPERATOR_PERSISTING])
414def test_intersect(tmp_path, mode):
415 class InputSchema(pw.Schema):
416 a: int = pw.column_definition(primary_key=True)
417
418 def logic(t_1: pw.Table, t_2: pw.Table) -> pw.Table:
419 return t_1.intersect(t_2)
420
421 run, _, input_path_2 = get_two_tables_runner(tmp_path, mode, logic, InputSchema)
422
423 run(["a", "1", "2", "3"], ["a", "1"], {"1,1"})
424 run(["a"], ["a", "3"], {"3,1"})
425 run(["a", "4", "5"], ["a", "5", "6"], {"5,1"})
426 run(["a", "6"], ["a", "4"], {"4,1", "6,1"})
427 os.remove(input_path_2 / "3")
428 run(["a"], ["a"], {"5,-1", "6,-1"})
429
430
431@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

runFunction · 0.90
get_two_tables_runnerFunction · 0.85
removeMethod · 0.45

Tested by

no test coverage detected