Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Commit

Permalink
Add initialization to docstring doctest
Browse files Browse the repository at this point in the history
The fix of an issue related to introspection in Sage, revealed an issue
with one of the doctests in sagenb. More specifically, before this
commit, `docstring` was called without first initializing the module,
but initialization is necessary so that `EMBEDDED_MODE` gets set, which
is needed to format docstrings correctly.

Apparently, this is just an issue with this specific doctest, and not
the notebook in general.

For more information, see https://trac.sagemath.org/ticket/26906.
  • Loading branch information
mwageringel committed Dec 19, 2018
1 parent 705c39c commit 31813c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sagenb/misc/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,10 @@ def docstring(obj_name, globs, system='sage'):
TESTS:
Check that Trac 10860 is fixed and we can handle Unicode help
strings in the notebook::
strings in the notebook, see also Trac 26906::
sage: from sagenb.misc.support import docstring
sage: from sagenb.misc.support import init, docstring
sage: init()
sage: D = docstring("r.lm", globs=globals())
"""
if system not in ['sage', 'python']:
Expand Down

0 comments on commit 31813c9

Please sign in to comment.