MCPcopy Create free account
hub / github.com/dagger/dagger / test_container_sync

Function test_container_sync

sdk/python/tests/client/test_integration.py:186–195  ·  view source on GitHub ↗
(alpine_image: str)

Source from the content-addressed store, hash-verified

184
185
186async def test_container_sync(alpine_image: str):
187 base = dag.container().from_(alpine_image)
188
189 # short cirtcut
190 with pytest.raises(dagger.QueryError, match="exit code: 1"):
191 await base.with_exec(["foobar"]).sync()
192
193 # chaining
194 out = await (await base.with_exec(["echo", "spam"]).sync()).stdout()
195 assert out == "spam\n"
196
197
198async def test_container_awaitable(alpine_image: str):

Callers

nothing calls this directly

Calls 5

from_Method · 0.80
syncMethod · 0.65
containerMethod · 0.45
with_execMethod · 0.45
stdoutMethod · 0.45

Tested by

no test coverage detected