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

Function test_update_rows

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

Source from the content-addressed store, hash-verified

477)
478@only_with_license_key("mode", [api.PersistenceMode.OPERATOR_PERSISTING])
479def test_update_rows(tmp_path, mode):
480 class InputSchema(pw.Schema):
481 a: int = pw.column_definition(primary_key=True)
482 b: int
483
484 def logic(t_1: pw.Table, t_2: pw.Table) -> pw.Table:
485 return t_1.update_rows(t_2)
486
487 run, _, input_path_2 = get_two_tables_runner(tmp_path, mode, logic, InputSchema)
488
489 run(["a,b", "1,2", "2,4"], ["a,b", "1,3", "3,5"], {"1,3,1", "2,4,1", "3,5,1"})
490 run(["a,b", "3,3"], ["a,b", "2,6", "5,1"], {"2,4,-1", "2,6,1", "5,1,1"})
491 os.remove(input_path_2 / "1")
492 run(["a,b"], ["a,b"], {"3,5,-1", "3,3,1", "1,3,-1", "1,2,1"})
493 run(["a,b", "7,10"], ["a,b", "3,8"], {"3,3,-1", "3,8,1", "7,10,1"})
494
495
496@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