Containers as Fixtures
Request shed (or docker_sidecar) and run commands, read files and inspect processes inside a real container.
Integration tests against real services, not mocks. Ask for a fixture, get a live Docker container or browser.
Integration tests need real services (a database, an API, a browser), not mocks. Standing those up by hand means container code in conftest.py, flaky startup races, and leftover containers when a test crashes.
TestShed hands you a running Docker container, or a Playwright browser, as a fixture. Ask for shed and you get a live container: TestShed pulls or builds the image, waits for it to be ready, and removes everything when the test ends.
def test_container_is_alive(shed):
assert shed.execute(["echo", "hello"]) == "hello"