pytest-embedded-qemu
Make pytest-embedded plugin work with QEMU.
What it is and what it does
pytest-embedded-qemu is a pytest plugin that extends pytest-embedded to run embedded system tests on QEMU emulation instead of physical target hardware. It provides a qemu fixture that manages the emulated environment and duplicates output to pexpect_proc for test assertion. When pytest-embedded-idf is also installed, the plugin can automatically generate bootable QEMU images from built binaries, streamlining the test setup workflow.
The package targets developers testing embedded firmware and bootloader code who want to avoid hardware dependencies during development and CI/CD. It sits between pytest-embedded and qemu.qmp, handling the glue logic to make QEMU behave as a pytest fixture. With active maintenance and support for modern Python versions, it's designed for teams building embedded systems.
Use it for:
- Run firmware unit tests in CI/CD pipelines without requiring physical hardware boards
- Develop and test bootloader code locally using QEMU before flashing to real devices
- Automate integration tests for embedded applications with reproducible QEMU environments
- Generate bootable QEMU images automatically from build artifacts when using pytest-embedded-idf
- Debug embedded code interactively by capturing QEMU output in pytest assertions
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that runs embedded system tests on QEMU instead of physical hardware, with optional integration for building bootable images when pytest-embedded-idf is available.
Yes, if you're testing embedded systems with pytest and want to avoid hardware dependencies. The package is actively maintained, has low install friction, uses a permissive license, and integrates cleanly with pytest-embedded. Install only if you have QEMU available on your system and are already using or planning to adopt pytest-embedded for your test suite.
Install
pytest-embedded-qemu on PyPI
pip
pip install pytest-embedded-qemuuv
uv add pytest-embedded-qemupoetry
poetry add pytest-embedded-qemuInstalling pytest-embedded-qemu
Before you install
Low friction install with active maintenance. Last commit 2026-08-10, released 59 days ago. Supports modern Python versions with only two runtime dependencies.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pytest-embedded-qemu
import pytest
@pytest.mark.usefixtures('qemu')
def test_on_qemu(qemu):
# Test runs on QEMU instance
pass
Requires Python 3.10 or later. QEMU must be installed on the system for the fixture to function.
Verify before relying
- Whether pytest-embedded-idf integration is required or optional for most use cases
- How the pexpect_proc duplication affects test output and debugging workflows
- Performance characteristics and typical test execution time overhead versus real hardware
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pytest-embedded, qemu.qmp |
| Maintenance | actively maintained — 59 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 143,293/month — #11,181 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_embedded_qemu-2.8.1-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-embeddedA pytest plugin that provides fixtures and…
permissive · top 15,000 on PyPI
pytest-embedded-idfA pytest plugin that integrates ESP-IDF…
permissive · top 15,000 on PyPI
pytest-embedded-serial-espA pytest plugin that provides fixtures and…
permissive · top 15,000 on PyPI
qemu.qmpA Python asyncio library for sending QMP (QEMU…
copyleft · top 15,000 on PyPI
pytest-embedded-jtagAdds JTAG debugging utilities to…
permissive · top 15,000 on PyPI
unicornUnicorn is a Python binding for a lightweight…
permissive · top 5,000 on PyPI
pytest-embedded-serialA pytest plugin that enables serial port…
permissive · top 15,000 on PyPI
pytest-rabbitmqA pytest plugin that provides fixtures to start…
copyleft · top 15,000 on PyPI
pytest-cppA pytest plugin that discovers and runs C++…
permissive · top 15,000 on PyPI
pytest-datafilesA pytest plugin that copies specified files and…
permissive · top 15,000 on PyPI