Metadata-Version: 2.4
Name: pytest-embedded-arduino
Version: 2.10.0
Summary: Make pytest-embedded plugin work with Arduino.
Author-email: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>, 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-embedded~=2.10.0
Requires-Dist: pytest-embedded-serial-esp~=2.10.0 ; extra == "serial"
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
Provides-Extra: serial

### pytest-embedded-arduino

A `pytest-embedded` service for testing [Arduino](https://www.arduino.cc/) sketch builds on embedded targets.

#### Service Activation

Activate this service by passing `arduino` to `--embedded-services`. Typically combined with `esp` to enable flashing and serial monitoring:

```shell
pytest --embedded-services esp,arduino --app-path /path/to/arduino-build
```

#### Extra Functionalities

- **Sketch Metadata Parsing**: Automatically locates the compiled sketch binary, bootloader, and partition table from the Arduino build folder.
- **Fast Flashing**: Uses differential flashing (`--diff-with`) to only write updated flash sectors, significantly speeding up consecutive test runs.
- **Full Reflash Option**: Easily disable fast flashing with `--no-fast-flash` when the flash state is unknown (such as after OTA tests).

#### CLI Options

- `--no-fast-flash`: Disable fast differential flashing and write the complete flash image. Default: `False`.

#### Quick Example

```python
from pytest_embedded import Dut


def test_arduino_sketch(dut: Dut):
    dut.expect('Setup complete')
    dut.expect('Sensor read: ')
```

