| 148 | |
| 149 | |
| 150 | async 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 | |
| 166 | async def test_container_with(alpine_image: str): |