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

Function test_container_awaitable

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

Source from the content-addressed store, hash-verified

196
197
198async def test_container_awaitable(alpine_image: str):
199 base = dag.container().from_(alpine_image)
200
201 # short cirtcut
202 with pytest.raises(dagger.QueryError, match="exit code: 1"):
203 await base.with_exec(["foobar"])
204
205 # chaining
206 out = await (await base.with_exec(["echo", "spam"])).stdout()
207 assert out == "spam\n"
208
209
210async def test_directory_sync():

Callers

nothing calls this directly

Calls 4

from_Method · 0.80
containerMethod · 0.45
with_execMethod · 0.45
stdoutMethod · 0.45

Tested by

no test coverage detected