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

Function test_object_sequence

sdk/python/tests/client/test_integration.py:150–163  ·  view source on GitHub ↗
(alpine_image: str, tmp_path: pathlib.Path)

Source from the content-addressed store, hash-verified

148
149
150async def test_object_sequence(alpine_image: str, tmp_path: pathlib.Path):
151 # Test that a sequence of objects doesn't fail.
152 # In this case, we're using Container.export's
153 # platform_variants which is a Sequence[Container].
154 variants = [
155 dag.container(platform=dagger.Platform(platform))
156 .from_(alpine_image)
157 .with_exec(["uname", "-m"])
158 for platform in ("linux/amd64", "linux/arm64")
159 ]
160 await dag.container().export(
161 path=str(tmp_path / "export.tar.gz"),
162 platform_variants=variants,
163 )
164
165
166async def test_container_with(alpine_image: str):

Callers

nothing calls this directly

Calls 5

from_Method · 0.80
PlatformMethod · 0.65
exportMethod · 0.65
with_execMethod · 0.45
containerMethod · 0.45

Tested by

no test coverage detected