fix(tests): use pytest.approx for float equality (S1244) #81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Claude/backup-script:fix/issue-42-S1244-run-report-duration-30.5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #42
Line 83 of
tests/unit/test_run_report.pycompared a float with==, flagged by SonarQubepython:S1244. Replaced withpytest.approxwith the default tolerance, which is thestandard idiom. Added
import pytestsince the file did not import it.No behavior change for passing inputs; tolerates floating-point representational
drift for edge inputs that should still be considered equal.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.