2
0
mirror of https://github.com/gentoo-mirror/gentoo.git synced 2026-02-15 00:10:55 +03:00
Files
gentoo/dev-python/pslab/files/pslab-3.0.0-pytest_record.patch
Marek Szuba dbd8ba325d dev-python/pslab: add 3.0.0
Closes: https://bugs.gentoo.org/921434
Signed-off-by: Marek Szuba <marecki@gentoo.org>
2024-01-30 15:14:57 +00:00

37 lines
1.4 KiB
Diff

Now that dev-python/pslab indirectly depends on pytest-reserial
(it is a test dependency of dev-python/mcbootflash), the option name --record
produces a collision.
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -8,9 +8,9 @@
Additionally, certain pins must be connected in a specific manner. Refer to the
individual test modules in the tests package.
-By calling pytest with the --record flag, the serial traffic generated by the
+By calling pytest with the --record-serial flag, the serial traffic generated by the
integration tests will be recorded to JSON files, which are played back during
-unit testing. The --record flag implies --integration.
+unit testing. The --record-serial flag implies --integration.
"""
import json
@@ -23,7 +23,7 @@
def pytest_addoption(parser):
parser.addoption("--integration", action="store_true", default=False)
- parser.addoption("--record", action="store_true", default=False)
+ parser.addoption("--record-serial", action="store_true", default=False)
@pytest.fixture(scope="module")
@@ -38,7 +38,7 @@
When running unit tests, the SerialHandler is a MockHandler.
"""
- record = request.config.getoption("--record")
+ record = request.config.getoption("--record-serial")
integration = request.config.getoption("--integration") or record
logfile = os.path.join(logdir, request.node.name + ".json")