From 1b9aff4c000da073c2af49e5d3bcace47662a659 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 16 Aug 2026 11:31:21 +0200 Subject: [PATCH] python3-pytest-sugar: deselect test broken by pytest hook-signature skew 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 --- .../python/python3-pytest-sugar/run-ptest | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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}}'