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

Function test_update_rows

python/pathway/tests/test_errors.py:1193–1230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1191
1192
1193def test_update_rows():
1194 t1 = pw.debug.table_from_markdown(
1195 """
1196 a
1197 1
1198 2
1199 3
1200 """
1201 ).with_id_from(pw.this.a)
1202 t2 = pw.debug.table_from_markdown(
1203 """
1204 a
1205 1
1206 1
1207 2
1208 """
1209 ).with_id_from(pw.this.a)
1210
1211 res = t1.update_rows(t2)
1212
1213 expected = T(
1214 """
1215 a
1216 2
1217 3
1218 """
1219 )
1220 expected_errors = T(
1221 """
1222 message | line
1223 duplicate key: ^YYY4HABTRW7T8VX2Q429ZYV70W | res = t1.update_rows(t2)
1224 """,
1225 split_on_whitespace=False,
1226 )
1227
1228 assert_table_equality_wo_index(
1229 (res, global_errors()), (expected, expected_errors), terminate_on_error=False
1230 )
1231
1232
1233def test_with_id_from():

Callers

nothing calls this directly

Calls 5

TFunction · 0.90
global_errorsFunction · 0.85
with_id_fromMethod · 0.80
table_from_markdownMethod · 0.80
update_rowsMethod · 0.80

Tested by

no test coverage detected