sagemath/sage

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

comment:1

Attachment: 13062.patch.gz

comment:2

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.

Changed dependencies from #12415 to #12415, #14331

Author: David Roe, Jeroen Demeyer

Reviewer: Jeroen Demeyer, David Roe

comment:5

Looks fine to me.

Merged: sage-5.9.beta2