Skip to content

Commit

Permalink
sagemathgh-39114: Remove unnecessary dummy lines in doctests
Browse files Browse the repository at this point in the history
    
I didn't know the dummy line is unnecessary while working on
sagemath#38945 . Better removing it so that
future developers won't stumble upon it in the future.

Side note: ideally instead of `known bug (meson ...)` we could just do
`optional - !meson`.

### 📝 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 linked a relevant issue or discussion.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39114
Reported by: user202729
Reviewer(s): Kwankyu Lee
  • Loading branch information
Release Manager committed Dec 13, 2024
2 parents 655b70d + bc9beec commit e2604e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/sage/repl/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
sage: from sage.repl.interpreter import get_test_shell
sage: shell = get_test_shell()
sage: print("dummy line"); shell.run_cell('1/0') # known bug (meson doesn't include the Cython source code) # see #25320 for the reason of the `...` and the dummy line in this test
dummy line
sage: shell.run_cell('1/0') # known bug (meson doesn't include the Cython source code)
...
ZeroDivisionError...Traceback (most recent call last)
...
Expand Down
5 changes: 2 additions & 3 deletions src/sage/repl/ipython_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,13 @@ def cython(self, line, cell):
....: ''')
UsageError: unrecognized arguments: --help
Test invalid quotes (see :mod:`sage.repl.interpreter` for explanation of the dummy line)::
Test invalid quotes::
sage: # needs sage.misc.cython
sage: print("dummy line"); shell.run_cell('''
sage: shell.run_cell('''
....: %%cython --a='
....: print(1)
....: ''')
dummy line
...
ValueError...Traceback (most recent call last)
...
Expand Down

0 comments on commit e2604e8

Please sign in to comment.