Skip to content

Clean up v2 test descriptors and remaining quality findings - #17

Merged
rjcloudsigma merged 1 commit into
masterfrom
maintenance/code-quality-follow-up
Oct 31, 2026
Merged

rjcloudsigma merged 1 commit into
masterfrom
maintenance/code-quality-follow-up

Conversation

@rjcloudsigma

@rjcloudsigma rjcloudsigma commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The refreshed master scan after #16 cleared the original 17 findings and reported four new findings in the descriptor regression tests (#29–32). Make those tests resource-safe even when the operation under test unexpectedly succeeds or fails to close its descriptor.

  • #29: Always clean up the raw fixture descriptor in finally, tolerating only EBADF because successful production cleanup already closes it. Keep the real fstat / EBADF assertion before fallback cleanup.
  • #30–31: Close any unexpectedly returned descriptor before assertRaises reports the missing exception. Verify the exact injected exception so a cleanup error cannot satisfy the failure expectation.
  • #32: Use import unittest.mock as mock consistently with import unittest, retaining the Python 2 mock fallback.

All 137 tests pass locally on Python 3.12; git diff --check passes. Independent review found no actionable defects. All 17 PR checks pass, including Python 2.7 and 3.6–3.15, distributions, Linux integration, CodeQL and Code Quality. Passing PR CI.

After merge, default-branch CI and Code Quality analysis pass. Verified the refreshed findings API returns an empty list and the quality dashboard shows 0 maintainability findings and 0 reliability findings, both rated Excellent.

@rjcloudsigma
rjcloudsigma merged commit afa083c into master Oct 31, 2026
17 checks passed
@rjcloudsigma
rjcloudsigma deleted the maintenance/code-quality-follow-up branch October 31, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant