Metadata-Version: 2.4
Name: pytest-embedded
Version: 2.10.0
Summary: A pytest plugin that designed for embedded testing.
Author-email: Fu Hanxi <fuhanxi@espressif.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Testing
License-File: LICENSE
Requires-Dist: pytest>=7.0
Requires-Dist: pexpect>=4.4
Requires-Dist: filelock>=3.12.2
Project-URL: changelog, https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md
Project-URL: documentation, https://docs.espressif.com/projects/pytest-embedded/en/latest/
Project-URL: homepage, https://github.com/espressif/pytest-embedded
Project-URL: repository, https://github.com/espressif/pytest-embedded

### pytest-embedded

The core plugin for the `pytest-embedded` framework. Designed for embedded testing across multiple targets and environments.

#### Key Features

- **Core Fixtures**: Provides essential fixtures including `dut`, `app`, `msg_queue`, `pexpect_proc`, and `redirect`.
- **String & Regex Matching**: Integrates `pexpect` for powerful output parsing with `dut.expect()` and `dut.expect_exact()`.
- **Multi-DUT Orchestration**: Test multi-device topologies (such as master-slave or mesh networks) using `--count`.
- **Flexible Parametrization**: Easily parametrize apps, targets, and services using `pytest` markers.
- **Unified Test Reports**: Parse and merge embedded Unity test results into JUnit XML reports.

#### Quickstart

```python
from pytest_embedded import Dut


def test_basic_expect(redirect, dut: Dut):
    with redirect():
        print('Ready to test!')

    dut.expect('Ready to test!')
```

Run the test:

```shell
pytest test_basic.py -s
```

