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

Built distribution (wheel)

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

Total release size: 50.3 kB

Release files / pytest_embedded_idf-2.10.1.tar.gz

Download URL pytest_embedded_idf-2.10.1.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a1d0193cf03bf608b8ae83b24510eb592ac323fda3a4ab0d0cb18b3c11af5473
BLAKE2b-256 checksum
How to use checksums
6e01f4884761c1634afa87d22f7c4295e79e7227d078135e7d790741f82b418f
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.1-py3-none-any.whl

Download URL pytest_embedded_idf-2.10.1-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1023b2261b7bbb8af5e11adf3c955907ec3258a634db47b3433c6d94c602fbe1
BLAKE2b-256 checksum
How to use checksums
608346cdda3a6f8f1bbf7339aaeac0fe36c1882740e4edf252b89efdbfb7bc64
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.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.10.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