Skip to content

Commit

Permalink
src/sage/misc/sageinspect.py: Update doctests for increased use of la…
Browse files Browse the repository at this point in the history
…zy imports
  • Loading branch information
mkoeppe authored and saraedum committed Apr 14, 2024
1 parent 1361c65 commit 8ae157a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sage/misc/sageinspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,7 @@ def sage_getfile(obj):
sage: from sage.misc.sageinspect import sage_getfile
sage: sage_getfile(sage.rings.rational)
'...sage/rings/rational.pyx'
sage: from sage.algebras.steenrod.steenrod_algebra import Sq # needs sage.combinat sage.modules
sage: sage_getfile(Sq) # needs sage.combinat sage.modules
'...sage/algebras/steenrod/steenrod_algebra.py'
sage: sage_getfile(x) # needs sage.symbolic
Expand Down Expand Up @@ -1386,6 +1387,7 @@ def sage_getfile_relative(obj):
sage: from sage.misc.sageinspect import sage_getfile_relative
sage: sage_getfile_relative(sage.rings.rational)
'sage/rings/rational.pyx'
sage: from sage.algebras.steenrod.steenrod_algebra import Sq # needs sage.combinat sage.modules
sage: sage_getfile_relative(Sq) # needs sage.combinat sage.modules
'sage/algebras/steenrod/steenrod_algebra.py'
sage: sage_getfile_relative(x) # needs sage.symbolic
Expand Down Expand Up @@ -2265,9 +2267,8 @@ def sage_getsourcelines(obj):
EXAMPLES::
sage: from sage.misc.sageinspect import sage_getsourcelines
sage: # needs sage.modules
sage: sage_getsourcelines(matrix)[1]
sage: from sage.matrix.constructor import matrix # needs sage.modules
sage: sage_getsourcelines(matrix)[1] # needs sage.modules
21
sage: sage_getsourcelines(matrix)[0][0]
'def matrix(*args, **kwds):\n'
Expand Down

0 comments on commit 8ae157a

Please sign in to comment.