fixup! pyln-client: don't crash Millisatoshi.to_approx_str() on zero
What changed, and why it matters
This commit is a trivial formatting cleanup (removing an extra blank line and adding one) in a test file. It does not change any code behavior, fix any bug, or alter any security-relevant logic.
No action needed; this is a non-functional style-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff only modifies whitespace in contrib/pyln-client/tests/test_units.py. It removes one surplus blank line and adds one blank line between test functions. No runtime code, no test assertions, and no library code are changed. The actual fix referenced by the ‘fixup!’ title is not present in this diff.
Changed components
contrib/pyln-client/tests/test_units.pyInspect captured patch +1 / −1
### contrib/pyln-client/tests/test_units.py
@@ -37,11 +37,11 @@ def test_to_approx_str():
assert amount.to_approx_str(1) == "12btc" # note: no rounding
-
def test_to_approx_str_zero():
assert Millisatoshi(0).to_approx_str() == "0btc"
assert Millisatoshi('0sat').to_approx_str(1) == "0btc"
+
def test_floats():
# test parsing amounts from floating number strings
amount = Millisatoshi("0.01btc")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.