diff mbox series

[meta-python,16/16] python3-pytest-sugar: deselect test broken by pytest hook-signature skew

Message ID 20260829001108.559544-16-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-python,01/16] python3-bleak: fetch git tag with tests/ for ptest instead of PyPI sdist | expand

Commit Message

Khem Raj Aug. 29, 2026, 12:11 a.m. UTC
From: Khem Raj <raj.khem@gmail.com>

test_report_header defines an inline conftest.py using the
pytest_report_header(startdir) hook signature; newer pytest pluggy
hook-signature validation rejects "startdir" (renamed to start_path
long ago), so the nested pytest subprocess it spawns exits with
PluginValidationError/INTERNAL_ERROR, and the outer assert
result.ret == 0 fails. Version-skew in pytest-sugars own test suite,
not a runtime bug.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../python/python3-pytest-sugar/run-ptest                 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-pytest-sugar/run-ptest b/meta-python/recipes-devtools/python/python3-pytest-sugar/run-ptest
index b4bf4b65d8..e08f9e32fd 100644
--- a/meta-python/recipes-devtools/python/python3-pytest-sugar/run-ptest
+++ b/meta-python/recipes-devtools/python/python3-pytest-sugar/run-ptest
@@ -1,3 +1,9 @@ 
 #!/bin/sh
 
-pytest -vv | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
+# test_report_header defines an inline conftest.py using the pytest_report_header(startdir)
+# hook signature; newer pytest's pluggy hook-signature validation rejects "startdir"
+# (renamed to start_path long ago), so the nested pytest subprocess it spawns exits with
+# PluginValidationError/INTERNAL_ERROR, and the outer assert result.ret == 0 fails. This is
+# a pytest-version-skew bug in pytest-sugar's own test suite (stale hook signature), not a
+# pytest-sugar runtime bug.
+pytest -vv --deselect tests/test_sugar.py::TestTerminalReporter::test_report_header | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'