Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac #18829: Broken doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanncohen committed Jul 3, 2015
1 parent ca2980f commit d42c0a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sage/doctest/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ def _process_doc(self, doctests, doc, namespace, start):
new_doctests = self.parse_docstring(docstring, namespace, start)
for dt in new_doctests:
if len(dt.examples) > 0 and not (hasattr(dt.examples[-1],'sage_source')
and dt.examples[-1].sage_source == "sig_on_count()\n"):
and dt.examples[-1].sage_source == "sig_on_count() # check sig_on/off pairings (virtual doctest)\n"):
# Line number refers to the end of the docstring
sigon = doctest.Example("sig_on_count()\n", "0\n", lineno=docstring.count("\n"))
sigon = doctest.Example("sig_on_count() # check sig_on/off pairings (virtual doctest)\n", "0\n", lineno=docstring.count("\n"))
sigon.sage_source = "sig_on_count() # check sig_on/off pairings (virtual doctest)\n"
dt.examples.append(sigon)
doctests.append(dt)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/doctest/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
**********************************************************************
File "sig_on.rst", line 5, in sage.doctest.tests.sig_on
Failed example:
sig_on_count()
sig_on_count() # check sig_on/off pairings (virtual doctest)
Expected:
0
Got:
Expand Down

0 comments on commit d42c0a4

Please sign in to comment.