Repository navigation
test: achieve 100% test coverage - #85
Merged
Merged
Conversation
Bug fixes: - Fix Config instance isolation (prevent shared state between instances) - Enable change_key feature (was marked as not implemented) - Enhance padding validation in Encryption.decrypt() Test improvements: - Add 29 new unit tests - Update test_initialize_3 to mock change_key.rekey() - All 287 tests passing Verified on Python 3.11 with uv virtual environment.
Added comprehensive test suite to reach 100% code coverage: - Test invalid padding in Encryption.decrypt - Test menu 's' (search) command path - Test vault migration path (version 1.x to 2.x) - Test sys.stdout.encoding edge cases - Test autocomplete with breaking characters - Test readline/libedit bindings - Test clipboard exception handling - Test secrets search exception paths All 325 tests passing. Coverage report shows 100% across all modules.
Owner
|
Can you please move tests/rename test files to match that they are resting? Codestyle is throwing errors: |
- Remove src/unittest/test_coverage_100.py - Add Encryption tests to lib/test_Encryption.py - Add autocomplete tests to modules/test_autocomplete.py - Add misc tests to modules/test_misc.py - Add clipboard tests to views/test_clipboard.py - Add menu tests to views/test_menu.py - Add secrets tests to views/test_secrets.py - Fix all E306 lint errors (missing blank lines before nested defs) - All tests pass (317 passed, 21 skipped)
Contributor
Author
|
Done. Tests reorganized to match source files (test_Config.py → lib/test_Config.py, etc.) and all E306 lint errors fixed. Pushed in commit 22265f8. |
Owner
|
@thejedi433 There are currently 2 errors in the build: |
Contributor
Author
|
Fixed both failing tests and pushed. The CI should pass now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds 38 new tests to bring vault to 100% test coverage across all modules, on top of the bug fixes in PR #84.
Changes
src/unittest/test_coverage_100.py(533 lines) covering:Test Results