MCPcopy
hub / github.com/pathwaycom/pathway / do_run

Function do_run

python/pathway/tests/test_persistence_iterate.py:100–120  ·  view source on GitHub ↗
(changes, expected_diffs)

Source from the content-addressed store, hash-verified

98 events: dict = {}
99
100 def do_run(changes, expected_diffs):
101 for eid, edata in changes.items():
102 events[eid] = edata
103 et, flag, data = edata
104 write_lines(
105 input_path / f"{eid}.csv",
106 ["event_time,flag,data", f"{et},{flag},{data}"],
107 )
108
109 G.clear()
110 t = pw.io.csv.read(input_path, schema=EventSchema, mode="static")
111 res = pipeline_fn(t)
112 pw.io.csv.write(res, output_path)
113 run(
114 persistence_config=pw.persistence.Config(
115 pw.persistence.Backend.filesystem(pstorage_path),
116 persistence_mode=mode,
117 )
118 )
119 _assert_diffs_are_unit(output_path)
120 _assert_diffs_match(output_path, expected_diffs)
121
122 return events, do_run
123

Calls 12

write_linesFunction · 0.90
runFunction · 0.90
_assert_diffs_are_unitFunction · 0.85
_assert_diffs_matchFunction · 0.85
itemsMethod · 0.80
clearMethod · 0.80
writeMethod · 0.80
filesystemMethod · 0.80
countMethod · 0.80
joinMethod · 0.45
reduceMethod · 0.45
groupbyMethod · 0.45

Tested by

no test coverage detected