pytest-embedded-serial 2.9.3__tar.gz → 2.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_embedded_serial-2.9.3 → pytest_embedded_serial-2.10.0}/PKG-INFO +32 -6
- pytest_embedded_serial-2.10.0/README.md +34 -0
- {pytest_embedded_serial-2.9.3 → pytest_embedded_serial-2.10.0}/pyproject.toml +1 -1
- {pytest_embedded_serial-2.9.3 → pytest_embedded_serial-2.10.0}/pytest_embedded_serial/__init__.py +1 -1
- pytest_embedded_serial-2.9.3/README.md +0 -8
- {pytest_embedded_serial-2.9.3 → pytest_embedded_serial-2.10.0}/LICENSE +0 -0
- {pytest_embedded_serial-2.9.3 → pytest_embedded_serial-2.10.0}/pytest_embedded_serial/dut.py +0 -0
- {pytest_embedded_serial-2.9.3 → pytest_embedded_serial-2.10.0}/pytest_embedded_serial/serial.py +0 -0
- {pytest_embedded_serial-2.9.3 → pytest_embedded_serial-2.10.0}/tests/test_serial.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-embedded-serial
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.10.0
|
|
4
4
|
Summary: Make pytest-embedded plugin work with Serial.
|
|
5
5
|
Author-email: Fu Hanxi <fuhanxi@espressif.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
20
20
|
Classifier: Programming Language :: Python
|
|
21
21
|
Classifier: Topic :: Software Development :: Testing
|
|
22
22
|
License-File: LICENSE
|
|
23
|
-
Requires-Dist: pytest-embedded~=2.
|
|
23
|
+
Requires-Dist: pytest-embedded~=2.10.0
|
|
24
24
|
Requires-Dist: pyserial~=3.0
|
|
25
25
|
Project-URL: changelog, https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md
|
|
26
26
|
Project-URL: documentation, https://docs.espressif.com/projects/pytest-embedded/en/latest/
|
|
@@ -29,10 +29,36 @@ Project-URL: repository, https://github.com/espressif/pytest-embedded
|
|
|
29
29
|
|
|
30
30
|
### pytest-embedded-serial
|
|
31
31
|
|
|
32
|
-
pytest
|
|
32
|
+
A `pytest-embedded` service for interacting with target hardware over serial (UART) ports.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
#### Service Activation
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
Activate this service by passing `serial` to `--embedded-services`:
|
|
37
|
+
|
|
38
|
+
```shell
|
|
39
|
+
pytest --embedded-services serial --port /dev/ttyUSB0
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Extra Functionalities
|
|
43
|
+
|
|
44
|
+
- **`serial` Fixture**: Provides a `Serial` object that manages port connection, reading, and writing.
|
|
45
|
+
- **`dut` Integration**: Automatically streams all incoming serial output to the `dut` and `pexpect_proc` fixtures for pattern matching.
|
|
46
|
+
- **Port Matching**: Select serial ports by device path or USB bus location.
|
|
47
|
+
|
|
48
|
+
#### CLI Options
|
|
49
|
+
|
|
50
|
+
- `--port`: Path to the serial port (e.g. `/dev/ttyUSB0`, `COM3`). Default: `None`.
|
|
51
|
+
- `--port-location`: USB device location string (format: `<bus>-<port>[-<port>]...`) to match dynamic port paths.
|
|
52
|
+
- `--baud`: Serial communication baud rate. Default: `115200`.
|
|
53
|
+
|
|
54
|
+
#### Quick Example
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from pytest_embedded import Dut
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def test_serial_echo(dut: Dut):
|
|
61
|
+
dut.write(b'ping\r\n')
|
|
62
|
+
dut.expect('pong')
|
|
63
|
+
```
|
|
38
64
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
### pytest-embedded-serial
|
|
2
|
+
|
|
3
|
+
A `pytest-embedded` service for interacting with target hardware over serial (UART) ports.
|
|
4
|
+
|
|
5
|
+
#### Service Activation
|
|
6
|
+
|
|
7
|
+
Activate this service by passing `serial` to `--embedded-services`:
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
pytest --embedded-services serial --port /dev/ttyUSB0
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
#### Extra Functionalities
|
|
14
|
+
|
|
15
|
+
- **`serial` Fixture**: Provides a `Serial` object that manages port connection, reading, and writing.
|
|
16
|
+
- **`dut` Integration**: Automatically streams all incoming serial output to the `dut` and `pexpect_proc` fixtures for pattern matching.
|
|
17
|
+
- **Port Matching**: Select serial ports by device path or USB bus location.
|
|
18
|
+
|
|
19
|
+
#### CLI Options
|
|
20
|
+
|
|
21
|
+
- `--port`: Path to the serial port (e.g. `/dev/ttyUSB0`, `COM3`). Default: `None`.
|
|
22
|
+
- `--port-location`: USB device location string (format: `<bus>-<port>[-<port>]...`) to match dynamic port paths.
|
|
23
|
+
- `--baud`: Serial communication baud rate. Default: `115200`.
|
|
24
|
+
|
|
25
|
+
#### Quick Example
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
from pytest_embedded import Dut
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_serial_echo(dut: Dut):
|
|
32
|
+
dut.write(b'ping\r\n')
|
|
33
|
+
dut.expect('pong')
|
|
34
|
+
```
|
|
File without changes
|
{pytest_embedded_serial-2.9.3 → pytest_embedded_serial-2.10.0}/pytest_embedded_serial/dut.py
RENAMED
|
File without changes
|
{pytest_embedded_serial-2.9.3 → pytest_embedded_serial-2.10.0}/pytest_embedded_serial/serial.py
RENAMED
|
File without changes
|
|
File without changes
|