Skip to content

Decompose IStorage tests and enhance coverage.#930

Merged
junkmd merged 10 commits intoenthought:mainfrom
junkmd:enhance_storage_tests
Feb 22, 2026
Merged

Decompose IStorage tests and enhance coverage.#930
junkmd merged 10 commits intoenthought:mainfrom
junkmd:enhance_storage_tests

Conversation

@junkmd
Copy link
Collaborator

@junkmd junkmd commented Feb 22, 2026

Summary

This pull request refactors test_storage.py to improve test organization and expand coverage for IStorage methods.
The monolithic Test_IStorage class has been decomposed into smaller, more focused test classes, enhancing readability and maintainability.

Additionally, new test cases specifically target error handling and edge cases for methods like DestroyElement, RenameElement, Stat flags, and SetStateBits.

- Extract `IStorage` constants and helper functions to global scope.
- Break down `Test_IStorage` into test classes for each `IStorage` method.
- Convert `TODO` comments to proper Python comments for better readability.
- Add `STATFLAG_NONAME` constant.
- Add test method to verify that `pwcsName` is `None` when `STATFLAG_NONAME`
  is used.
…exists.

- Add `E_ACCESSDENIED` constant.
- Add test method to verify that `IStorage.RenameElement` raises
  `E_ACCESSDENIED` when the destination name already exists.
@junkmd junkmd added this to the 1.4.16 milestone Feb 22, 2026
@junkmd junkmd added the tests enhance or fix tests label Feb 22, 2026
@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.50%. Comparing base (258da0e) to head (f1a2006).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #930      +/-   ##
==========================================
+ Coverage   88.47%   88.50%   +0.03%     
==========================================
  Files         139      139              
  Lines       13575    13620      +45     
==========================================
+ Hits        12010    12055      +45     
  Misses       1565     1565              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@junkmd junkmd merged commit 5b1aaaf into enthought:main Feb 22, 2026
96 of 101 checks passed
@junkmd junkmd deleted the enhance_storage_tests branch February 23, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests enhance or fix tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant