What changed, and why it matters
This is a tiny quality-of-life change to a test helper. It only makes an error message clearer when a test fails, so developers can see exactly what text was produced. It does not touch Bitcoin's network code, wallet, consensus rules, or any code that runs in production.
No security action needed. Treat as a normal test-framework cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies assert_raises_process_error in test/functional/test_framework/util.py. The change switches a string concatenation to an f-string and adds !r so the captured process output is printed as a repr() string. This improves readability of test failures and avoids ambiguity from whitespace/newlines. It is purely a test-framework diagnostic improvement.
Changed components
test/functional/test_framework/util.pyInspect captured patch +1 / −1
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index 2eb891cf..8e1e3c71 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -136,7 +136,7 @@ def assert_raises_process_error(returncode: int, output: str, fun: Callable, *ar
if returncode != e.returncode:
raise AssertionError("Unexpected returncode %i" % e.returncode)
if output not in e.output:
- raise AssertionError("Expected substring not found:" + e.output)
+ raise AssertionError(f"Expected substring not found in: {e.output!r}")
else:
raise AssertionError("No exception raised")
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.