Skip to main content

pytest-embedded-idf

A pytest-embedded service tailored for ESP-IDF applications and test workflows.

Service Activation

Activate this service by passing idf to --embedded-services. Typically used together with esp for physical hardware testing:

pytest --embedded-services esp,idf --app-path /path/to/esp-idf-app

Extra Functionalities

  • App Metadata Parsing: Reads project_description.json and build artifacts to identify the target chip, flash settings, partition tables, and binary paths.
  • Smart Flashing & Caching: Automatically flashes the bootloader, partition table, and application. Caches binary hashes across the session to skip redundant flashing.
  • Panic & Core Dump Decoding: Automatically parses and decodes panic stack traces and core dumps from target flash/UART when a test fails.
  • Partition Table & NVS Controls: Erase NVS blocks or customize the partition tool script.
  • Unity Test Runner: Integrated support for Unity C test suites via dut.expect_unity_test_output() and the case_tester fixture for test menu navigation.
  • Linux Target Support: Includes LinuxDut and LinuxSerial to test ESP-IDF POSIX/Linux applications directly on the host machine.
  • Dynamic Parametrization: Provides idf_parametrize to expand supported_targets and filter chips by SoC capability strings.

CLI Options

  • --supported-targets: Comma-separated list of officially supported targets for the test. Default: None.
  • --preview-targets: Comma-separated list of preview/experimental targets for the test. Default: None.
  • --part-tool: Path to the partition table generator script. Default: $IDF_PATH/components/partition_table/gen_esp32part.py.
  • --confirm-target-elf-sha256: Verify ELF SHA256 against target flash before skipping re-flashing. Default: False.
  • --erase-nvs: Erase NVS partition blocks when flashing binaries. Default: False.
  • --skip-check-coredump: Skip auto-checking for core dumps and panic traces on test failure. Default: False.

Quick Example

from pytest_embedded import Dut


def test_idf_app(dut: Dut):
    # App information is parsed automatically from the ESP-IDF build directory
    print(f'Running target: {dut.app.target}')
    dut.expect('Booting ESP-IDF app...')
    dut.expect('Hello world!')

Metadata

Release files for pytest-embedded-idf 2.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-embedded-idf 2.10.0
File Size Uploaded Provenance Actions
pytest_embedded_idf-2.10.0.tar.gz 26.8 kB Without provenance Details for pytest_embedded_idf-2.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-embedded-idf 2.10.0
File Interpreter ABI Platform Actions
pytest_embedded_idf-2.10.0-py3-none-any.whl Python 3 none any Details for pytest_embedded_idf-2.10.0-py3-none-any.whl

Total release size: 50.3 kB

Release files / pytest_embedded_idf-2.10.0.tar.gz

Download URL pytest_embedded_idf-2.10.0.tar.gz
Size 26.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f73d5ad20d919343720c2bcc6de81b12d1569e22906545777e2bde316cf976d3
BLAKE2b-256 checksum
How to use checksums
09e3d7f92baab65c74e61391043c4043f84165309de44698cdafcf6f67c7a9b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / pytest_embedded_idf-2.10.0-py3-none-any.whl

Download URL pytest_embedded_idf-2.10.0-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a918859effd7dd48f6a7e6ce547bef322b3d5e606750be47f544c07a80c0e3ad
BLAKE2b-256 checksum
How to use checksums
c022e441687b0d5069e31b0ed26c877f9893b1147b766dd4bc453ce85c4b14f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Security for pytest-embedded-idf 2.10.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.10.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page