pytest-embedded-serial 2.4.0__tar.gz → 2.6.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.4.0 → pytest_embedded_serial-2.6.0}/PKG-INFO +2 -2
- {pytest_embedded_serial-2.4.0 → pytest_embedded_serial-2.6.0}/pyproject.toml +1 -1
- {pytest_embedded_serial-2.4.0 → pytest_embedded_serial-2.6.0}/pytest_embedded_serial/__init__.py +1 -1
- {pytest_embedded_serial-2.4.0 → pytest_embedded_serial-2.6.0}/pytest_embedded_serial/serial.py +5 -1
- {pytest_embedded_serial-2.4.0 → pytest_embedded_serial-2.6.0}/LICENSE +0 -0
- {pytest_embedded_serial-2.4.0 → pytest_embedded_serial-2.6.0}/README.md +0 -0
- {pytest_embedded_serial-2.4.0 → pytest_embedded_serial-2.6.0}/pytest_embedded_serial/dut.py +0 -0
- {pytest_embedded_serial-2.4.0 → pytest_embedded_serial-2.6.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.6.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
|
|
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
19
19
|
Classifier: Programming Language :: Python
|
|
20
20
|
Classifier: Topic :: Software Development :: Testing
|
|
21
21
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: pytest-embedded~=2.
|
|
22
|
+
Requires-Dist: pytest-embedded~=2.6.0
|
|
23
23
|
Requires-Dist: pyserial~=3.0
|
|
24
24
|
Project-URL: changelog, https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md
|
|
25
25
|
Project-URL: documentation, https://docs.espressif.com/projects/pytest-embedded/en/latest/
|
{pytest_embedded_serial-2.4.0 → pytest_embedded_serial-2.6.0}/pytest_embedded_serial/serial.py
RENAMED
|
@@ -144,7 +144,7 @@ class Serial:
|
|
|
144
144
|
logging.debug(f'released {port}')
|
|
145
145
|
|
|
146
146
|
@contextlib.contextmanager
|
|
147
|
-
def disable_redirect_thread(self) -> bool:
|
|
147
|
+
def disable_redirect_thread(self, kill_port: bool = False) -> bool:
|
|
148
148
|
"""
|
|
149
149
|
kill the redirect thread, and start a new one after got yield back
|
|
150
150
|
|
|
@@ -152,10 +152,14 @@ class Serial:
|
|
|
152
152
|
True if redirect serial thread has been terminated
|
|
153
153
|
"""
|
|
154
154
|
killed = self.stop_redirect_thread()
|
|
155
|
+
if kill_port:
|
|
156
|
+
self.proc.close()
|
|
155
157
|
|
|
156
158
|
yield killed
|
|
157
159
|
|
|
158
160
|
if killed:
|
|
161
|
+
if kill_port:
|
|
162
|
+
self._start()
|
|
159
163
|
self.start_redirect_thread()
|
|
160
164
|
|
|
161
165
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|