| 609 | |
| 610 | |
| 611 | def test_extract_shared_pipe(extract_step: Extract): |
| 612 | def input_gen(): |
| 613 | yield from [1, 2, 3] |
| 614 | |
| 615 | input_r = DltResource.from_data(input_gen) |
| 616 | source = DltSource( |
| 617 | dlt.Schema("selectables"), "module", [input_r, input_r.with_name("gen_clone")] |
| 618 | ) |
| 619 | extract_step.extract(source, 20, 1) |
| 620 | # both tables got generated |
| 621 | assert "input_gen" in source.schema._schema_tables |
| 622 | assert "gen_clone" in source.schema._schema_tables |
| 623 | |
| 624 | |
| 625 | def test_extract_renamed_clone_and_parent(extract_step: Extract): |