{"guid":"rc2aMpMgOQ_QX-lcULS5Hg","title":"Testing Containers with Python and pytest","subtitle":null,"slug":"5011-testing-containers-with-python-and-pytest","link":"https://c3voc.de","description":"To ease the pain of testing container images, we’ve developed the `pytest_container` plugin for [pytest](https://pytest.org/). The plugin\nmakes it possible to use pytest to perform tests on containers and software inside containers. You don’t have to take care of pulling images, building\nthem, or picking ports on the host. You just describe your container setup and pass it to a test function. In return, the plugin gives you a connection\nto the container. Using the connection, you can verify the container’s state using the [testinfra](https://testinfra.readthedocs.io/) python framework.\nThe plugin even cleans up after itself when you’re done.\n\nIn short, `pytest_container` makes it possible to write tests in Python: no need to build your own framework from scratch or worry about the boring\ncontainer plumbing tasks.\n\nJoin this talk to see `pytest_container` in action and learn how it can make your life easier!\n\nLicensed to the public under https://creativecommons.org/licenses/by-sa/4.0/","original_language":"eng","persons":["Dan Čermák"],"view_count":28,"promoted":false,"date":"2025-06-27T11:00:00.000+02:00","release_date":"2025-06-28T00:00:00.000+02:00","updated_at":"2026-03-24T11:00:05.578+01:00","tags":["5011","2025","osc25","Open Source","galerie","osc25-eng","Day 2"],"length":884,"duration":884,"thumb_url":"https://static.media.ccc.de/media/events/osc/2025/5011-rc2aMpMgOQ_QX-lcULS5Hg.jpg","poster_url":"https://static.media.ccc.de/media/events/osc/2025/5011-rc2aMpMgOQ_QX-lcULS5Hg_preview.jpg","timeline_url":"https://static.media.ccc.de/media/events/osc/2025/5011-rc2aMpMgOQ_QX-lcULS5Hg.timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/events/osc/2025/5011-rc2aMpMgOQ_QX-lcULS5Hg.thumbnails.vtt","frontend_link":"https://media.ccc.de/v/5011-testing-containers-with-python-and-pytest","url":"https://api.media.ccc.de/public/events/rc2aMpMgOQ_QX-lcULS5Hg","conference_title":"openSUSE Conference 2025","conference_url":"https://api.media.ccc.de/public/conferences/osc25","related":[],"recordings":[{"size":25,"length":884,"mime_type":"video/webm","language":"eng","filename":"osc25-5011-eng-Testing_Containers_with_Python_and_pytest_webm-sd.webm","state":"new","folder":"webm-sd","high_quality":false,"width":720,"height":576,"updated_at":"2025-07-01T15:30:02.808+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2025/webm-sd/osc25-5011-eng-Testing_Containers_with_Python_and_pytest_webm-sd.webm","url":"https://api.media.ccc.de/public/recordings/88784","event_url":"https://api.media.ccc.de/public/events/rc2aMpMgOQ_QX-lcULS5Hg","conference_url":"https://api.media.ccc.de/public/conferences/osc25"},{"size":50,"length":884,"mime_type":"video/webm","language":"eng","filename":"osc25-5011-eng-Testing_Containers_with_Python_and_pytest_webm-hd.webm","state":"new","folder":"webm-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2025-07-01T14:46:08.836+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2025/webm-hd/osc25-5011-eng-Testing_Containers_with_Python_and_pytest_webm-hd.webm","url":"https://api.media.ccc.de/public/recordings/88748","event_url":"https://api.media.ccc.de/public/events/rc2aMpMgOQ_QX-lcULS5Hg","conference_url":"https://api.media.ccc.de/public/conferences/osc25"},{"size":9,"length":884,"mime_type":"audio/opus","language":"eng","filename":"osc25-5011-eng-Testing_Containers_with_Python_and_pytest_opus.opus","state":"new","folder":"opus","high_quality":false,"width":0,"height":0,"updated_at":"2025-06-28T13:50:26.064+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2025/opus/osc25-5011-eng-Testing_Containers_with_Python_and_pytest_opus.opus","url":"https://api.media.ccc.de/public/recordings/88498","event_url":"https://api.media.ccc.de/public/events/rc2aMpMgOQ_QX-lcULS5Hg","conference_url":"https://api.media.ccc.de/public/conferences/osc25"},{"size":19,"length":884,"mime_type":"video/mp4","language":"eng","filename":"osc25-5011-eng-Testing_Containers_with_Python_and_pytest_sd.mp4","state":"new","folder":"h264-sd","high_quality":false,"width":720,"height":576,"updated_at":"2025-06-28T13:50:22.528+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2025/h264-sd/osc25-5011-eng-Testing_Containers_with_Python_and_pytest_sd.mp4","url":"https://api.media.ccc.de/public/recordings/88497","event_url":"https://api.media.ccc.de/public/events/rc2aMpMgOQ_QX-lcULS5Hg","conference_url":"https://api.media.ccc.de/public/conferences/osc25"},{"size":13,"length":884,"mime_type":"audio/mpeg","language":"eng","filename":"osc25-5011-eng-Testing_Containers_with_Python_and_pytest_mp3.mp3","state":"new","folder":"mp3","high_quality":false,"width":0,"height":0,"updated_at":"2025-06-28T13:49:48.889+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2025/mp3/osc25-5011-eng-Testing_Containers_with_Python_and_pytest_mp3.mp3","url":"https://api.media.ccc.de/public/recordings/88496","event_url":"https://api.media.ccc.de/public/events/rc2aMpMgOQ_QX-lcULS5Hg","conference_url":"https://api.media.ccc.de/public/conferences/osc25"},{"size":41,"length":884,"mime_type":"video/mp4","language":"eng","filename":"osc25-5011-eng-Testing_Containers_with_Python_and_pytest_hd.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2025-06-28T12:52:42.957+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2025/h264-hd/osc25-5011-eng-Testing_Containers_with_Python_and_pytest_hd.mp4","url":"https://api.media.ccc.de/public/recordings/88448","event_url":"https://api.media.ccc.de/public/events/rc2aMpMgOQ_QX-lcULS5Hg","conference_url":"https://api.media.ccc.de/public/conferences/osc25"}]}