Support multi-line subsection descriptions in test docstrings via indentation#4
Merged
alithethird merged 3 commits intorule_65_aifrom Nov 9, 2025
Merged
Conversation
…tinuation Modified _get_sections to properly handle multi-line subsections where continuation lines are identified by indentation. This allows test docstrings using arrange/act/assert or given/when/then patterns to have descriptions that span multiple lines without requiring each line to end with a period. Co-authored-by: alithethird <39213991+alithethird@users.noreply.github.com>
- Added Python integration tests to verify multiline subsection support - Added getters for _Section.name and _Section.subs to make them accessible from Python - Exported _get_sections function to Python module - Created example file demonstrating the new feature - All 236 tests pass (230 Rust + 6 new tests) Co-authored-by: alithethird <39213991+alithethird@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove requirement for dot at end of test docstrings
Support multi-line subsection descriptions in test docstrings via indentation
Nov 9, 2025
alithethird
approved these changes
Nov 9, 2025
alithethird
added a commit
that referenced
this pull request
Dec 3, 2025
…-test-docs Support multi-line subsection descriptions in test docstrings via indentation
alithethird
added a commit
that referenced
this pull request
Dec 19, 2025
…-test-docs Support multi-line subsection descriptions in test docstrings via indentation
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.
Test docstrings using
arrange:/act:/assert:orgiven:/when:/then:patterns required each line to be self-contained. Multi-line descriptions now use indentation to indicate continuation.Changes
Parser logic (
src/docstring.rs):_get_sections()to recognize indented lines without:as continuationsfilter_mapto explicit loop for continuation line handlingPython bindings (
src/lib.rs,src/docstring.rs):#[getter]methods for_Section.nameand_Section.subs_get_sectionsto Python moduleTests:
Example
Before:
After:
All existing docstrings remain valid. All 236 tests pass.
Original prompt
.#1✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.