(alpine_image: str)
| 196 | |
| 197 | |
| 198 | async 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 | |
| 210 | async def test_directory_sync(): |