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

Function test_update_cells

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

Source from the content-addressed store, hash-verified

1151
1152
1153def test_update_cells():
1154 old = T(
1155 """
1156 | pet | owner | age
1157 1 | 1 | Alice | 10
1158 2 | 2 | Alice | 10
1159 """
1160 )
1161 update = T(
1162 """
1163 | pet | owner | age
1164 5 | 0 | Eve | 10
1165 2 | 2 | Eve | 10
1166 2 | 3 | Eve | 10
1167 """
1168 )
1169 old.promise_universe_is_equal_to(update)
1170 res = old.update_cells(update)
1171 res = res.remove_errors()
1172
1173 expected = T(
1174 """
1175 | pet | owner | age
1176 1 | 1 | Alice | 10
1177 """
1178 )
1179 expected_errors = T(
1180 """
1181 message | line
1182 updating a row that does not exist, key: ^3S2X6B265PV8BRY8MZJ91KQ0Z4 | res = old.update_cells(update)
1183 duplicate key: ^Z3QWT294JQSHPSR8KTPG9ECE4W | res = old.update_cells(update)
1184 """,
1185 split_on_whitespace=False,
1186 )
1187
1188 assert_table_equality_wo_index(
1189 (res, global_errors()), (expected, expected_errors), terminate_on_error=False
1190 )
1191
1192
1193def test_update_rows():

Callers

nothing calls this directly

Calls 5

TFunction · 0.90
global_errorsFunction · 0.85
update_cellsMethod · 0.80
remove_errorsMethod · 0.80

Tested by

no test coverage detected