mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-08-31 15:51:17 +00:00
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 <raj.khem@gmail.com>
This commit is contained in:
@@ -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}}'
|
||||
|
||||
Reference in New Issue
Block a user