MCPcopy
hub / github.com/ucbepic/docetl / test_frame_to_python

Method test_frame_to_python

tests/test_builder.py:138–149  ·  view source on GitHub ↗
(self, sample_input)

Source from the content-addressed store, hash-verified

136 compile(code, "<test>", "exec")
137
138 def test_frame_to_python(self, sample_input):
139 _config.default_model = "gpt-4o-mini"
140 frame = (
141 read_json(sample_input)
142 .map("summarize",
143 prompt="Summarize: {{ input.text }}",
144 output={"schema": {"summary": "string"}})
145 )
146 code = frame.to_python()
147 assert "docetl.default_model = 'gpt-4o-mini'" in code
148 assert ".map('summarize'" in code
149 compile(code, "<test>", "exec")
150
151 def test_multiline_prompt(self, sample_input):
152 frame = (

Callers

nothing calls this directly

Calls 3

read_jsonFunction · 0.90
to_pythonMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected