Opened 6 years ago
Closed 6 years ago
#18658 closed defect (fixed)
Skipped doctests in graph_plot.py
Reported by: | ncohen | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.8 |
Component: | graph theory | Keywords: | |
Cc: | jhpalmieri | Merged in: | |
Authors: | Nathann Cohen | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | 2fe2044 (Commits) | Commit: | 2fe2044a149855ac1e87d1c0b080e7954f9745ff |
Dependencies: | Stopgaps: |
Description (last modified by )
As reported at [1], some doctests from graph_plot are skipped. This is because of a replacement that is being done in the __doc__
variable of this file.
After the branch is applied:
sage: from sage.doctest.control import DocTestDefaults sage: from sage.doctest.sources import FileDocTestSource sage: FileDocTestSource("/home/ncohen/sage/graphs/graph_plot.py", DocTestDefaults(long=True, optional=True))._test_enough_doctests(verbose=True) <no output>
[1] https://groups.google.com/forum/#!topic/sage-devel/iIGZfMT9Oio
Change History (11)
comment:1 Changed 6 years ago by
- Branch set to pubic/18658
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 6 years ago by
- Branch changed from pubic/18658 to public/18658
- Commit set to 375f2ff3ce56b8a0f7b53f31a64feaa6f9f2400b
comment:3 Changed 6 years ago by
- Reviewers set to Volker Braun
- Status changed from needs_review to positive_review
comment:4 Changed 6 years ago by
Thaaaaaaaaaaaaanks !
comment:5 Changed 6 years ago by
- Status changed from positive_review to needs_work
sage -t --long src/sage/doctest/sources.py ********************************************************************** File "src/sage/doctest/sources.py", line 694, in sage.doctest.sources.FileDocTestSource._test_enough_doctests Failed example: for path, dirs, files in itertools.chain(os.walk('sage'), os.walk('doc')): # long time path = os.path.relpath(path) dirs.sort(); files.sort() for F in files: _, ext = os.path.splitext(F) if ext in ('.py', '.pyx', '.pxd', '.pxi', '.sage', '.spyx', '.rst'): filename = os.path.join(path, F) FDS = FileDocTestSource(filename, DocTestDefaults(long=True,optional=True)) FDS._test_enough_doctests(verbose=False) Expected: ... There are 1 unexpected tests being run in sage/doctest/reporting.py There are 9 tests in sage/graphs/graph_plot.py that are not being run There are 3 tests in sage/rings/invariant_theory.py that are not being run Got: ... There are 1 unexpected tests being run in sage/doctest/reporting.py There are 3 tests in sage/rings/invariant_theory.py that are not being run **********************************************************************
comment:6 follow-up: ↓ 7 Changed 6 years ago by
Fixing problems breaks doctests. I see :-P
comment:7 in reply to: ↑ 6 Changed 6 years ago by
Replying to ncohen:
Fixing problems breaks doctests. I see
:-P
Hopefully, it also goes the other way around: if you introduce wrong doctests, sage.doctest.sources
will (possibly) detect it.
comment:8 Changed 6 years ago by
- Commit changed from 375f2ff3ce56b8a0f7b53f31a64feaa6f9f2400b to 2fe2044a149855ac1e87d1c0b080e7954f9745ff
Branch pushed to git repo; I updated commit sha1. New commits:
2fe2044 | trac #18658: Broken doctest
|
comment:9 Changed 6 years ago by
- Status changed from needs_work to needs_review
comment:10 Changed 6 years ago by
- Status changed from needs_review to positive_review
comment:11 Changed 6 years ago by
- Branch changed from public/18658 to 2fe2044a149855ac1e87d1c0b080e7954f9745ff
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
trac #18658: Skipped doctests in graph_plot.py