-
-
Notifications
You must be signed in to change notification settings - Fork 1
✅ increase coverage #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d-only and positional-only parameters
…x delimiters and key handling
…pr, and equality behavior
…nit behavior and equality checks
WalkthroughAdds multiple new unit test modules covering decoder signature handling, regex-delimiter parsing, object parsing internals, EncodeOptions post-init/equality, encode internals (circular detection, iterable filtering, comma format), utilities/merging edge cases, and WeakWrapper hashing/equality/repr behaviors. No production code or public API signatures are changed. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used🧬 Code graph analysis (6)tests/unit/decode_test.py (2)
tests/unit/weakref_test.py (1)
tests/unit/decode_options_test.py (3)
tests/unit/encode_test.py (4)
tests/unit/utils_test.py (5)
tests/unit/encode_options_test.py (2)
🪛 Ruff (0.13.1)tests/unit/decode_test.py1634-1634: Unused function argument: (ARG001) tests/unit/decode_options_test.py145-145: Unused function argument: (ARG001) 158-158: Unused function argument: (ARG001) 🔇 Additional comments (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
===========================================
+ Coverage 93.82% 100.00% +6.17%
===========================================
Files 16 16
Lines 1134 1134
===========================================
+ Hits 1064 1134 +70
+ Misses 70 0 -70 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…e detection and iterable filtering
…dding tests for undefined entry removal and cycle detection
…cluding value when proxy is alive
This pull request adds comprehensive new unit tests for the encoding, decoding, utility, and weak reference functionality in the codebase. The new tests cover edge cases, error handling, and internal logic, improving test coverage and robustness for the core modules.
Key additions and improvements:
DecodeOptions and Decoding Behavior:
DecodeOptionsto verify handling of various decoder signatures, including keyword-only, positional-only, unannotated, and literal-annotated parameters, as well as fallback logic to legacy and default decoders. Added a test to ensure built-in functions without signatures raise the original error._parse_object.EncodeOptions and Encoding Internals:
EncodeOptionsinitialization, equality checks, and restoration of the default encoder._encode, handling of iterable filters for indexable objects, and correct serialization of datetimes in comma format.Utility Functions:
Utils.mergeto cover edge cases with lists, undefined values, and structured lists. Added tests forUtils.compact,_remove_undefined_from_list, and_dicts_are_equalto ensure correct handling of cycles, nested structures, and equality checks. [1] [2] [3]WeakWrapper and Weak Reference Handling:
WeakWrapperto verify correct behavior of__repr__,__hash__(including sets and unhashable objects), and equality checks, including handling after the proxied object is garbage collected.Test Imports and Setup:
These changes significantly strengthen the reliability and maintainability of the codebase by ensuring that core behaviors and edge cases are thoroughly tested.
Summary by CodeRabbit