-
Notifications
You must be signed in to change notification settings - Fork 172
chore/format node tests black #1615
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
base: main
Are you sure you want to change the base?
chore/format node tests black #1615
Conversation
Signed-off-by: SubhraSameerDash <2303105_cseai@gita.edu.in>
Signed-off-by: SubhraSameerDash <2303105_cseai@gita.edu.in>
|
Hi, this is MergeConflictBot. Please resolve these conflicts locally and push the changes. To assist you, please read: Thank you for contributing! |
Signed-off-by: Subhra Sameer Dash <170787407+Subhrasameerdash@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR formats node unit test files using Black to ensure consistent code style across the test suite, addressing issue #1545.
Changes:
- Applied Black formatting to four node-related test files (node_update_transaction_test.py, node_tls_test.py, node_create_transaction_test.py, node_address_test.py)
- Updated CHANGELOG.md to document the formatting changes
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/node_update_transaction_test.py | Reformatted assertions to split long lines for better readability |
| tests/unit/node_tls_test.py | Applied Black formatting including line breaks, spacing, and quote consistency; includes one regex pattern fix |
| tests/unit/node_create_transaction_test.py | Reformatted long assertion lines for improved readability |
| tests/unit/node_address_test.py | Reformatted imports, function calls, and added consistent blank lines |
| CHANGELOG.md | Added changelog entry documenting the formatting changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/unit/node_tls_test.py
Outdated
| with pytest.raises(ValueError, match="No certificate available."): | ||
|
|
||
| with pytest.raises(ValueError, match=r"No certificate available\."): |
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line contains a non-formatting change. The original code had match="No certificate available." which has been changed to match=r"No certificate available\.". This adds a raw string prefix and escapes the period in the regex pattern. While this is technically a bug fix (the period should be escaped in regex), it goes beyond the stated scope of this PR which is to "format node unit tests with Black for consistent style." Black does not modify the content of strings or add raw string prefixes to fix regex patterns.
This change should either be:
- Documented in the PR description as an additional bug fix
- Separated into a different commit/PR that focuses on the bug fix
- Reverted to match the original code if this PR should only contain formatting changes
WalkthroughApplied Black formatting to node-related unit tests and updated the changelog; additionally, explicit assertions were added to Changes
Sequence Diagram(s)(Skipped — changes are formatting and small test-assertion additions that do not introduce new multi-component control flow.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
CHANGELOG.md
Outdated
| - Improve unit test coverage for `Hbar`, including edge cases, validation, comparisons, and hashing. (#1483) | ||
| - Standardize formatting of `evm_address_test.py` using Black for improved consistency and readability (#1529) | ||
| - Improve unit test coverage for Hbar, including edge cases, validation, comparisons, and hashing. (#1483) | ||
| - Standardize formatting of evm_address_test.py using Black for improved consistency and readability (#1529) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove duplicate changelog entries.
Lines 19-20 are duplicated in lines 21-22. This creates redundant entries that reduce changelog clarity. Lines 19-20 use proper formatting with backticks around code identifiers (`Hbar` and `evm_address_test.py`), while lines 21-22 lack this formatting.
🔧 Proposed fix: Remove duplicate entries
Remove lines 21-22 as they duplicate the properly formatted entries on lines 19-20:
- Formatted node unit test files with Black (`#1545`)
- Improve unit test coverage for `Hbar`, including edge cases, validation, comparisons, and hashing. (`#1483`)
- Standardize formatting of `evm_address_test.py` using Black for improved consistency and readability (`#1529`)
-- Improve unit test coverage for Hbar, including edge cases, validation, comparisons, and hashing. (`#1483`)
-- Standardize formatting of evm_address_test.py using Black for improved consistency and readability (`#1529`)
- Formatted unit test files using Black.Signed-off-by: SubhraSameerDash <2303105_cseai@gita.edu.in>
Signed-off-by: SubhraSameerDash <2303105_cseai@gita.edu.in>
|
Hii @manishdait in the last PR I made some mistakes while creating the branch, so this is the new one Can you help me resolve the 2 failed checks |
Signed-off-by: SubhraSameerDash <2303105_cseai@gita.edu.in>
Description:
Format node unit tests with Black for consistent style.
Related issue(s):
Fixes #1545
Notes for reviewer:
Checklist