#13062 closed enhancement (fixed)
Change parsing of nodoctest
Reported by: | roed | Owned by: | mvngu |
---|---|---|---|
Priority: | trivial | Milestone: | sage-5.9 |
Component: | doctest framework | Keywords: | |
Cc: | Merged in: | sage-5.9.beta2 | |
Authors: | David Roe, Jeroen Demeyer | Reviewers: | Jeroen Demeyer, David Roe |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #12415, #14331 | Stopgaps: |
Description
Currently Sage will refrain from doctesting a file if the string "nodoctest" is in the first 50 characters. 50 characters is pretty short, and I think it's also good to encourage people to start the line with nodoctest. So I would propose that we change "somewhere in the first 50 characters" to "one of the first 10 lines starts with '# nodocteset' or '.. nodoctest'".
Attachments (2)
Change History (9)
Changed 9 years ago by
comment:1 Changed 9 years ago by
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
comment:3 Changed 9 years ago by
- Dependencies changed from #12415 to #12415, #14331
Changed 9 years ago by
comment:4 Changed 9 years ago by
- Reviewers set to Jeroen Demeyer, David Roe
comment:5 Changed 9 years ago by
- Status changed from needs_review to positive_review
Looks fine to me.
comment:6 Changed 9 years ago by
- Merged in set to sage-5.9.beta2
- Resolution set to fixed
- Status changed from positive_review to closed
comment:7 Changed 9 years ago by
- Component changed from doctest to doctest framework
Note: See
TracTickets for help on using
tickets.
I feel like this solution is overkill. Why not simply replace
read(50)
byread(512)
? That should be enough and would probably be more effecient too.