Change parsing of nodoctest
roed314 opened this issue · 8 comments
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'".
Depends on #12415
Depends on #14331
Component: doctest framework
Author: David Roe, Jeroen Demeyer
Reviewer: Jeroen Demeyer, David Roe
Merged: sage-5.9.beta2
Issue created by migration from https://trac.sagemath.org/ticket/13062
Attachment: 13062.patch.gz
I feel like this solution is overkill. Why not simply replace read(50) by read(512)? That should be enough and would probably be more effecient too.
Attachment: 13062_nodoctest_review.patch.gz
Author: David Roe, Jeroen Demeyer
Reviewer: Jeroen Demeyer, David Roe
Looks fine to me.
Merged: sage-5.9.beta2