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

Function test_difference

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

Source from the content-addressed store, hash-verified

433)
434@only_with_license_key("mode", [api.PersistenceMode.OPERATOR_PERSISTING])
435def test_difference(tmp_path, mode):
436 class InputSchema(pw.Schema):
437 a: int = pw.column_definition(primary_key=True)
438
439 def logic(t_1: pw.Table, t_2: pw.Table) -> pw.Table:
440 return t_1.difference(t_2)
441
442 run, _, input_path_2 = get_two_tables_runner(tmp_path, mode, logic, InputSchema)
443
444 run(["a", "1", "2", "3"], ["a", "1"], {"2,1", "3,1"})
445 run(["a"], ["a", "3"], {"3,-1"})
446 run(["a", "4", "5"], ["a", "5", "6"], {"4,1"})
447 run(["a", "6"], ["a", "4"], {"4,-1"})
448 os.remove(input_path_2 / "3")
449 run(["a"], ["a"], {"5,1", "6,1"})
450
451
452@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