MCPcopy
hub / github.com/dlt-hub/dlt / test_extract_shared_pipe

Function test_extract_shared_pipe

tests/extract/test_extract.py:611–622  ·  view source on GitHub ↗
(extract_step: Extract)

Source from the content-addressed store, hash-verified

609
610
611def 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
625def test_extract_renamed_clone_and_parent(extract_step: Extract):

Callers

nothing calls this directly

Calls 4

DltSourceClass · 0.90
with_nameMethod · 0.80
from_dataMethod · 0.45
extractMethod · 0.45

Tested by

no test coverage detected