(tmp_path, mode)
| 477 | ) |
| 478 | @only_with_license_key("mode", [api.PersistenceMode.OPERATOR_PERSISTING]) |
| 479 | def test_update_rows(tmp_path, mode): |
| 480 | class InputSchema(pw.Schema): |
| 481 | a: int = pw.column_definition(primary_key=True) |
| 482 | b: int |
| 483 | |
| 484 | def logic(t_1: pw.Table, t_2: pw.Table) -> pw.Table: |
| 485 | return t_1.update_rows(t_2) |
| 486 | |
| 487 | run, _, input_path_2 = get_two_tables_runner(tmp_path, mode, logic, InputSchema) |
| 488 | |
| 489 | run(["a,b", "1,2", "2,4"], ["a,b", "1,3", "3,5"], {"1,3,1", "2,4,1", "3,5,1"}) |
| 490 | run(["a,b", "3,3"], ["a,b", "2,6", "5,1"], {"2,4,-1", "2,6,1", "5,1,1"}) |
| 491 | os.remove(input_path_2 / "1") |
| 492 | run(["a,b"], ["a,b"], {"3,5,-1", "3,3,1", "1,3,-1", "1,2,1"}) |
| 493 | run(["a,b", "7,10"], ["a,b", "3,8"], {"3,3,-1", "3,8,1", "7,10,1"}) |
| 494 | |
| 495 | |
| 496 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected