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

Built distribution (wheel)

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

Total release size: 50.3 kB

Release files / pytest_embedded_idf-2.11.0.tar.gz

Download URL pytest_embedded_idf-2.11.0.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
733a8459b8cabd0bb0e6d7d95d4120ac68897fa7876e19e44e8074d4f87b5777
BLAKE2b-256 checksum
How to use checksums
776b28410980bbbb41a6448d40447ff7a9b6f8b48c4c5669735f170ad6c1ae0f
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.0-py3-none-any.whl

Download URL pytest_embedded_idf-2.11.0-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e4e733019d942b6fa974583c303d9908cb743c969db1604dc6a84d7e64e29cf
BLAKE2b-256 checksum
How to use checksums
fcc605ef64c95eda1f1fc093ee9f32a844bc80a0b912b4e54c7230c495a0bb5b
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.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.11.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