fix(tests): use pytest.approx for float equality (S1244) #84

Open
Claude wants to merge 1 commit from Claude/backup-script:fix/issue-43-S1244-run-report-duration-zero into master
First-time contributor

Closes #43

Line 88 of tests/unit/test_run_report.py compared a float with ==, flagged by SonarQube
python:S1244. Replaced with pytest.approx with the default tolerance, which is the
standard idiom. Added import pytest since 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.

Closes #43 Line 88 of `tests/unit/test_run_report.py` compared a float with `==`, flagged by SonarQube `python:S1244`. Replaced with `pytest.approx` with the default tolerance, which is the standard idiom. Added `import pytest` since 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.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/issue-43-S1244-run-report-duration-zero:Claude-fix/issue-43-S1244-run-report-duration-zero
git switch Claude-fix/issue-43-S1244-run-report-duration-zero

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.

git switch master
git merge --no-ff Claude-fix/issue-43-S1244-run-report-duration-zero
git switch Claude-fix/issue-43-S1244-run-report-duration-zero
git rebase master
git switch master
git merge --ff-only Claude-fix/issue-43-S1244-run-report-duration-zero
git switch Claude-fix/issue-43-S1244-run-report-duration-zero
git rebase master
git switch master
git merge --no-ff Claude-fix/issue-43-S1244-run-report-duration-zero
git switch master
git merge --squash Claude-fix/issue-43-S1244-run-report-duration-zero
git switch master
git merge --ff-only Claude-fix/issue-43-S1244-run-report-duration-zero
git switch master
git merge Claude-fix/issue-43-S1244-run-report-duration-zero
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bc1bb/backup-script!84
No description provided.