#5816: [with patch; needs review] doctesting -- make it possible run doctests in
order from file, in random order, and in random seeded order
-------------------------+--------------------------------------------------
Reporter: was | Owner: mabshoff
Type: enhancement | Status: new
Priority: major | Milestone: sage-3.4.1
Component: doctest | Keywords:
-------------------------+--------------------------------------------------
Comment(by was):
The following tests fail after applying this patch and running the test
suite on rc3:
{{{
sage -t -long devel/sage/sage/quadratic_forms/quadratic_form.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/quadratic_forms/quadratic_form.py", line 1304:
sage: Q1.level_ideal()
Expected:
Principal ideal (1) of Rational Field
Got:
doctest:1252: UserWarning: Warning -- The level of a quadratic form
over a field is always 1. Do you really want to do this?!?
Principal ideal (1) of Rational Field
**********************************************************************
1 items had failures:
1 of 8 in __main__.example_0351962372
***Test Failed*** 1 failures.
MOST EVERYTHING IN:
sage -t -long devel/sage/sage/misc/latex.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/misc/latex.py", line 62:
sage: latex([1,2,3])
Expected:
sage -t -long devel/sage/sage/libs/pari/gen.pyx
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/libs/pari/gen.pyx", line 8575:
sage: pari._primelimit()
Expected:
500519
Got:
500000
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/libs/pari/gen.pyx", line 7013:
sage: pari('[a,b,c; d,e,f; g,h,i]').matadjoint()
Expected:
[(i*e - h*f), (-i*b + h*c), (f*b - e*c); (-i*d + g*f), i*a - g*c, -f*a
+ d*c; (h*d - g*e), -h*a + g*b, e*a - d*b]
Got:
[e*i - h*f, -b*i + h*c, (f*b - e*c); -d*i + g*f, a*i - g*c, (-f*a +
d*c); (h*d - g*e), (-h*a + g*b), (e*a - d*b)]
**********************************************************************
2 items had failures:
1 of 5 in __main__.example_0786952607
1 of 4 in __main__.example_2085375216
***Test Failed*** 2 failures.
For whitespace errors, see the file
/scratch/wstein/build/sage-3.4.1.rc3/tmp/.doctest_gen.py
[3.4 s]
SEVERAL THINGS:
sage -t -long devel/sage/sage/libs/symmetrica/schur.pxi
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/libs/symmetrica/schur.pxi", line 369:
sage: symmetrica.compute_schur_with_alphabet_det(2,2)
Exception raised:
Traceback (most recent call last):
File "/scratch/wstein/build/sage-3.4.1.rc3/local/bin/ncadoctest.py",
line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File
"/scratch/wstein/build/sage-3.4.1.rc3/local/bin/sagedoctest.py", line 38,
in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/scratch/wstein/build/sage-3.4.1.rc3/local/bin/ncadoctest.py",
line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_0960543897[2]>", line 1, in <module>
symmetrica.compute_schur_with_alphabet_det(Integer(2),Integer(2))###line
369:
sage: symmetrica.compute_schur_with_alphabet_det(2,2)
File "schur.pxi", line 382, in
sage.libs.symmetrica.symmetrica.compute_schur_with_alphabet_det_symmetrica
(sage/libs/symmetrica/symme
trica.c:17919) if isinstance(part, (int, Integer)):
TypeError: isinstance() arg 2 must be a class, type, or tuple of
classes and types
sage -t -long devel/sage/sage/rings/real_rqdf.pyx
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/rings/real_rqdf.pyx", line 531:
sage: w= RQDF('1.34435343435344446376457677898097745635222')
Expected nothing
Got:
doctest:1172: DeprecationWarning: RQDF is deprecated; use
RealField(212) instead.
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/rings/real_rqdf.pyx", line 4:
: RQDF(1)
Expected:
doctest:...: DeprecationWarning: RQDF is deprecated; use
RealField(212) instead.
1.000000000000000000000000000000000000000000000000000000000000000
Got:
1.000000000000000000000000000000000000000000000000000000000000000
**********************************************************************
2 items had failures:
1 of 6 in __main__.example_0123338167
1 of 12 in __main__.example_0497399660
***Test Failed*** 2 failures.
sage -t -long devel/sage/sage/libs/fplll/fplll.pyx
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/libs/fplll/fplll.pyx", line 761:
sage: A = gen_ntrulike2(5,10,12); A
Expected:
[ 12 0 0 0 0 0 0 0 0 0]
[ 0 12 0 0 0 0 0 0 0 0]
[ 0 0 12 0 0 0 0 0 0 0]
[ 0 0 0 12 0 0 0 0 0 0]
[ 0 0 0 0 12 0 0 0 0 0]
and a few more...
sage -t -long devel/sage/sage/rings/number_field/class_group.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/rings/number_field/class_group.py", line 107:
sage: C.gen(0)
Expected:
Fractional ideal class (130, 1/2*a + 137/2)
Got:
Fractional ideal class (41, a - 10)
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/rings/number_field/class_group.py", line 109:
sage: C.gen(1)
Expected:
Fractional ideal class (7, a)
Got:
Fractional ideal class (17, a)
**********************************************************************
sage -t -long devel/sage/sage/structure/proof/proof.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/structure/proof/proof.py", line 109:
sage: proof.number_field()
Expected:
True
Got:
False
**********************************************************************
1 items had failures:
1 of 7 in __main__.example_3571288829
***Test Failed*** 1 failures.
[1.4 s]
sage -t -long devel/sage/sage/combinat/crystals/crystals.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/combinat/crystals/crystals.py", line 80:
sage: Tab.plot()
Expected nothing
Got:
Graphics object consisting of 52 graphics primitives
**********************************************************************
1 items had failures:
1 of 12 in __main__.example_3764993440
***Test Failed*** 1 failures.
sage -t -long devel/sage/sage/combinat/words/word.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/combinat/words/word.py", line 119:
sage: w
Expected:
word: 2,1,3,12
Got:
word: 2-1-3-12
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/combinat/words/word.py", line 837:
sage: Words(range(1000))([0,1,10,101]).__str__()
Expected:
'word: 0,1,10,101'
Got:
'word: 0-1-10-101'
**********************************************************************
2 items had failures:
1 of 10 in __main__.example_0401337461
1 of 5 in __main__.example_2333993738
***Test Failed*** 2 failures.
sage -t -long devel/sage/sage/combinat/sf/sfa.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/combinat/sf/sfa.py", line 65:
sage: m(a)
Expected:
3*m[1, 1, 1, 1] + 2*m[2, 1, 1] + m[2, 2] + m[3, 1]
Got:
3*m[1, 1, 1, 1] + m[2, 2] + 2*m[2, 1, 1] + m[3, 1]
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/combinat/sf/sfa.py", line 94:
sage: m.get_print_style()
Expected:
'lex'
Got:
'maximal_part'
**********************************************************************
1 items had failures:
sage -t -long devel/sage/sage/plot/plot3d/texture.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/plot/plot3d/texture.py", line 69:
sage: t.mtl_str()
Expected:
'newmtl texture2\nKa 0.2 0.2 0.5\nKd 0.4 0.4 1.0\nKs 0.0 0.0
0.0\nillum 1\nNs 1\nd 0.600000000000000'
Got:
'newmtl texture13\nKa 0.2 0.2 0.5\nKd 0.4 0.4 1.0\nKs 0.0 0.0
0.0\nillum 1\nNs 1\nd 0.600000000000000'
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/plot/plot3d/texture.py", line 71:
sage: t.tachyon_str()
Expected:
'Texdef texture2\n Ambient 0.333333333333 Diffuse 0.666666666667
Specular 0.0 Opacity 0.600000000000000\n Color 0.4 0.4 1.0\n TexF
unc 0'
Got:
'Texdef texture13\n Ambient 0.333333333333 Diffuse 0.666666666667
Specular 0.0 Opacity 0.600000000000000\n Color 0.4 0.4 1.0\n Tex
Func 0'
**********************************************************************
1 items had failures:
2 of 10 in __main__
sage -t -long devel/sage/sage/calculus/equations.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/calculus/equations.py", line 895:
sage: bool( x^2 > x )
Expected:
False
Got:
True
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/calculus/equations.py", line 1391:
sage: assumptions()
Expected:
[x > 0, y > 0, z == 1]
Got:
[x > 2, c != 0, x > 0, y > 0, z == 1]
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/calculus/equations.py", line 1394:
sage: assumptions()
Expected:
[y > 0]
Got:
[x > 2, c != 0, y > 0]
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/calculus/equations.py", line 1397:
sage: assumptions()
Expected:
[y > 0, y is even]
Got:
[x > 2, c != 0, y > 0, y is even]
**********************************************************************
2 items had failures:
1 of 13 in __main__.example_0570214236
3 of 13 in __main__.example_0930958418
age -t -long devel/sage/sage/interfaces/singular.py
Exception exceptions.RuntimeError: RuntimeError('Singular error:\n ?
`sage48` is not defined\n ? error occurred in STDIN line 24: `sage48 ==
sage48;`',) in 'sage.structure.parent_old._unregister_pair' ignored
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/interfaces/singular.py", line 1051:
sage: singular.option()
Expected:
//options: redefine loadLib usage prompt
Got:
//options: intStrategy redefine loadLib usage prompt
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/interfaces/singular.py", line 1053:
sage: singular.option('get')
Expected:
0,
10321
Got:
67108864,
10321
[[tons more problems!]]
age -t -long devel/sage/sage/interfaces/maxima.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/interfaces/maxima.py", line 275:
sage: maxima("laplace(diff(x(t),t),t,s)")
Expected:
s*?%laplace(x(t),t,s)-x(0)
Got:
s*'laplace(x(t),t,s)-x(0)
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/interfaces/maxima.py", line 280:
sage: maxima("laplace(diff(x(t),t,2),t,s)")
Expected:
-?%at('diff(x(t),t,1),t=0)+s^2*?%laplace(x(t),t,s)-x(0)*s
Got:
-'at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s
[[many other problems]]
sage -t -long devel/sage/sage/calculus/calculus.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/calculus/calculus.py", line 8081:
sage: latex(gamma(x+1))
Expected:
\Gamma \left( x + 1 \right)
Got:
\Gamma \left( \mathrm{x} + 1 \right)
**********************************************************************
1 items had failures:
1 of 4 in __main__.example_1540991106
sage -t -long devel/sage/sage/server/notebook/worksheet.py
**********************************************************************
File "/scratch/wstein/build/sage-3.4.1.rc3/devel/sage-
main/sage/server/notebook/worksheet.py", line 147:
sage: sage.server.notebook.worksheet._a_sage
Expected nothing
Got:
Sage
**********************************************************************
1 items had failures:
1 of 5 in __main__.example_3589583854
***Test Failed*** 1 failures.
The following tests failed:
sage -t -long
devel/sage/sage/quadratic_forms/random_quadraticform.py # File not found
sage -t -long devel/sage/sage/quadratic_forms/quadratic_form.py #
1 doctests failed
sage -t -long devel/sage/sage/misc/random_testing.py # File not
found
sage -t -long devel/sage/sage/misc/randstate.pyx # File not found
sage -t -long devel/sage/sage/misc/latex.py # 3 doctests failed
sage -t -long devel/sage/sage/libs/pari/gen.pyx # 2 doctests
failed
sage -t -long devel/sage/sage/libs/symmetrica/schur.pxi # 5
doctests failed
sage -t -long devel/sage/sage/rings/real_rqdf.pyx # 2 doctests
failed
sage -t -long devel/sage/sage/libs/fplll/fplll.pyx # 5 doctests
failed
sage -t -long devel/sage/sage/rings/number_field/class_group.py #
2 doctests failed
sage -t -long devel/sage/sage/structure/proof/proof.py # 1
doctests failed
sage -t -long devel/sage/sage/combinat/crystals/crystals.py # 1
doctests failed
sage -t -long devel/sage/sage/combinat/words/word.py # 2 doctests
failed
sage -t -long devel/sage/sage/combinat/sf/sfa.py # 2 doctests
failed
sage -t -long devel/sage/sage/probability/random_variable.py #
File not found
sage -t -long devel/sage/sage/plot/plot3d/texture.py # 2 doctests
failed
sage -t -long devel/sage/sage/calculus/equations.py # 4 doctests
failed
sage -t -long devel/sage/sage/interfaces/singular.py # 5 doctests
failed
sage -t -long devel/sage/sage/interfaces/maxima.py # 5 doctests
failed
sage -t -long devel/sage/sage/calculus/calculus.py # 1 doctests
failed
sage -t -long devel/sage/sage/ext/random.pxi # File not found
sage -t -long devel/sage/sage/server/notebook/worksheet.py # 1
doctests failed
----------------------------------------------------------------------
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5816#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---