-
-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-39102: Show continuation lines when doctest crashes I think this makes more sense. Normally the format is like ``` sage: code(code) ## line 1234 ## 'result' ``` or ``` sage: code(code) code(code) ## line 1234 ## 'result' ``` with the patch, the display becomes ``` sage: code(code) ....: code(code) ## line 1234 ## 'result' ``` ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #39102 Reported by: user202729 Reviewer(s): Julian Rüth
- Loading branch information
Showing
4 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
The :exc:`NameError` raised on the second line should be displayed, even | ||
if we crash immediately afterwards:: | ||
if we crash immediately afterwards (also test printing of line continuation):: | ||
|
||
sage: import time, signal | ||
sage: print(1, | ||
....: 2) | ||
1 2 | ||
sage: this_gives_a_NameError | ||
sage: os.kill(os.getpid(), signal.SIGKILL) |