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.11.1

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.11.1
File Size Uploaded Provenance Actions
pytest_embedded_idf-2.11.1.tar.gz 26.7 kB Without provenance Details for pytest_embedded_idf-2.11.1.tar.gz

Built distribution (wheel)

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

Total release size: 50.3 kB

Release files / pytest_embedded_idf-2.11.1.tar.gz

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

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

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

Security for pytest-embedded-idf 2.11.1

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.11.1 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