Rummaging through the plot code, I've come across DOCTEST_MODE a couple of 
times.  I can't find it documented anywhere, but it seems to be used as a 
flag for a function to tell whether it's being run for doctesting or not.  
Probably you can copy some of the examples to produce a doctest which only 
shows the deprecation warning when *not* in doctest mode.  Here are the 
places DOCTEST_MODE is used in the sage library; good luck (and please let 
us know if you figure out how to use it :)

-Niles


sage: search_src('DOCTEST_MODE')
misc/functional.py:1504:    if sage.plot.plot.DOCTEST_MODE:
misc/hg.py:339:        from sage.plot.plot import DOCTEST_MODE
misc/hg.py:340:        if not os.path.exists(os.path.join(os.environ['HOME'
], '.hgrc')) and not DOCTEST_MODE:
plot/animate.py:619:        if plot.DOCTEST_MODE:
plot/plot.py:334:DOCTEST_MODE = False
plot/plot.py:337:DOCTEST_MODE_FILE = os.path.join(sage.misc.misc.SAGE_TMP, 
'test.png')
plot/plot.py:1767:        if DOCTEST_MODE:
plot/plot.py:1769:            self.save(DOCTEST_MODE_FILE, **kwds)
plot/plot.py:3860:        if DOCTEST_MODE:
plot/plot.py:3861:            self.save(DOCTEST_MODE_FILE,
plot/plot3d/base.pyx:1078:        from sage.plot.plot import 
EMBEDDED_MODE,DOCTEST_MODE
plot/plot3d/base.pyx:1082:        if DOCTEST_MODE:
plot/plot3d/base.pyx:1091:        if DOCTEST_MODE or viewer=='tachyon' or (
viewer=='java3d' and EMBEDDED_MODE):
plot/plot3d/base.pyx:1098:        if DOCTEST_MODE or viewer=='java3d':
plot/plot3d/base.pyx:1109:        if DOCTEST_MODE or viewer=='jmol':
plot/plot3d/base.pyx:1144:        if not DOCTEST_MODE and not EMBEDDED_MODE:
plot/plot3d/tachyon.py:314:        if sage.plot.plot.DOCTEST_MODE:



-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to