()
| 1191 | |
| 1192 | |
| 1193 | def 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 | |
| 1233 | def test_with_id_from(): |
nothing calls this directly
no test coverage detected