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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-embedded-serial
3
- Version: 2.9.3
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.9.3
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 embedded service for testing via serial ports
32
+ A `pytest-embedded` service for interacting with target hardware over serial (UART) ports.
33
33
 
34
- Extra Functionalities:
34
+ #### Service Activation
35
35
 
36
- - `serial`: enable the fixture
37
- - `dut`: duplicate the `serial` output to `pexpect_proc`.
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
+ ```
@@ -29,7 +29,7 @@ dynamic = ["version", "description"]
29
29
  requires-python = ">=3.10"
30
30
 
31
31
  dependencies = [
32
- "pytest-embedded~=2.9.3",
32
+ "pytest-embedded~=2.10.0",
33
33
  "pyserial~=3.0",
34
34
  ]
35
35
 
@@ -8,4 +8,4 @@ __all__ = [
8
8
  'SerialDut',
9
9
  ]
10
10
 
11
- __version__ = '2.9.3'
11
+ __version__ = '2.10.0'
@@ -1,8 +0,0 @@
1
- ### pytest-embedded-serial
2
-
3
- pytest embedded service for testing via serial ports
4
-
5
- Extra Functionalities:
6
-
7
- - `serial`: enable the fixture
8
- - `dut`: duplicate the `serial` output to `pexpect_proc`.