Hello, I'm having trouble doctesting a file outside the Sage library:
$ sage -t example-sageexample.sage
sage -t "example-sageexample.sage"
A mysterious error (perhaps a memory error?) occurred, which may have
crashed doctest.
[0.2 s]
----------------------------------------------------------------------
The following tests failed:
sage -t "example-sageexample.sage" # Segfault
Total time for all tests: 0.2 seconds
This happens with 4.3.3 on both Linux and OS X. According to the
developer guide, this should work, but it fails, both with the .sage and
.py files. Any ideas? I'm attaching the offending file, which is related
to a new SageTeX feature that Nicolas Thiery developed.
Dan
--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------
## This file (example-sageexample.sage) was *autogenerated* from the file
example-sageexample.tex.
import sagetex
_st_ = sagetex.SageTeXProcessor('example-sageexample')
try:
_st_.doctest(0, r"""
sage: 1+1
2
sage: x^3
x^3
""", globals(), locals(), False)
except:
_st_.goboom(27)
try:
_st_.doctest(1, r"""
sage: 1+1
2
sage: x^3
x^3
""", globals(), locals(), True)
except:
_st_.goboom(50)
try:
_st_.doctest(2, r"""
sage: 1+1
2
sage: x^3
x^3
sage: integral(cyclotomic_polynomial(10))
1/5*x^5 - 1/4*x^4 + 1/3*x^3 - 1/2*x^2 + x
""", globals(), locals(), False)
except:
_st_.goboom(64)
try:
_st_.doctest(3, r"""
sage: p = 2
sage: p
2
""", globals(), locals(), False)
except:
_st_.goboom(71)
try:
_st_.doctest(4, r"""
sage: p
2
""", globals(), locals(), False)
except:
_st_.goboom(76)
try:
_st_.doctest(5, r"""
sage: def f(n):
... "Returns n^p"
... return n^p
...
sage: f(5)
125
""", globals(), locals(), False)
except:
_st_.goboom(86)
try:
_st_.doctest(6, r"""
sage: 1; 2; a=4; 3; a
1
2
3
4
sage: a
4
""", globals(), locals(), False)
except:
_st_.goboom(113)
_st_.endofdoc()
signature.asc
Description: Digital signature
