#Hi all, I was wondering if somebody

1 messages · Page 1 of 1 (latest)

grand vapor
#

Hey 👋 can you share a bit more of the code? Are you calling anything like test.stdout() or test.sync()?

somber spire
#

I don't do any of this.

#

the dagger code is basic now, just boiler plate

  async with dagger.Connection(dagger.Config(log_output=sys.stderr)) as client:
    src = client.host().directory(".")
    source = (
      client.container()
      .from_("python:3.12-slim-bullseye")
      .with_directory("/ws",src)
    )
    
    runner = (
      source.with_workdir("/ws")
      .with_exec(["pip","install","-r","requirements.txt"])
      .with_exec(["pip","install",".[test]"])
    )
    
    test = runner.with_exec(["pytest","-v","tests"])
#

I'll dig into the runner stdout() and sync() methods.

#

adding stdout = await test.stdout() was the key