Hello everybody,

A while ago I noticed that my *new independent module* on toric
varieties causes an error in a really obscure long output for one of
the tests in symbolic/random_tests.py. Volker Braun pointed in
http://trac.sagemath.org/sage_trac/ticket/8988#comment:9

"I think the change in the random_test is because the patched sage/
schemes/generic/algebraic_scheme now imports latex which imports
random which changes the random seed. So it is all right, and fixing
the random_test doctest is the right thing to do (TM). "

(the patch at #8988 which leads to the error does not actually change
algebraic_scheme, it was changed earlier)

Now I rebased #8988, tried the test, and in addition to the previous
error (which has actually changed since the last time I looked at it),
I got
**********************************************************************
File "/home/novoselt/sage/devel/sage-main/sage/symbolic/
random_tests.py", line 211:
    sage: random_expr(5, verbose=True)
Expected:
    About to apply <built-in function mul> to [v1, v1]
    About to apply <built-in function add> to [-1/3, v1]
    About to apply <built-in function add> to [v1^2, v1 - 1/3]
    v1^2 + v1 - 1/3
Got:
    About to apply <built-in function mul> to [v1, v1]
    About to apply <built-in function add> to [v1^2, v1]
    About to apply <built-in function neg> to [v1^2 + v1]
    -v1^2 - v1
**********************************************************************

I definitely can include a patch replacing the output with a new one,
which seems to be as correct as the previous one, but I think that all
these random tests should be somehow rewritten to give non-random
output. Can they just not show anything and check only if there were
exceptions raised in the process? Otherwise it just seems to me that
any patch may lead to new errors without any apparent reason.

Thank you!
Andrey

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

Reply via email to