From 712f9261c25496053ae203ec6b12b6410560f01c Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Wed, 25 Aug 2021 19:25:17 +0200 Subject: [PATCH] fix doctest getting source code --- src/sage/misc/sageinspect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index f4729d30bbf..48bd8c62ec2 100644 --- a/src/sage/misc/sageinspect.py +++ b/src/sage/misc/sageinspect.py @@ -2260,8 +2260,11 @@ def sage_getsourcelines(obj): ([...'class MPolynomialIdeal( MPolynomialIdeal_singular_repr, \\\n', ...) sage: x = var('x') - sage: lines, lineno = sage_getsourcelines(x); lines[0:2] + sage: lines, lineno = sage_getsourcelines(x); lines[0:5] ['cdef class Expression(CommutativeRingElement):\n', + '\n', + ' cdef GEx _gobj\n', + '\n', ' cpdef object pyobject(self):\n'] sage: lines[-1] # last line ' return S\n'