I'm not sure how to disable to cache. But clearing it doesn't seem to
help. I've reduced my test file down to a single loop over the single
failing function and sometimes it works and sometimes it doesn't. Here
is the test driving loop and results. Look how sporadic they are:
from sympy.core.cache import clear_cache
for i in range(10):
test_multi()
clear_cache()
print 'end of 10 runs'
. . . . . x . . . . end of 10 runs
. x . . . . . . . . end of 10 runs
x . . . x x . . . . end of 10 runs
. . x . x . . . . x end of 10 runs
. x x . x . . . . x end of 10 runs
x . x . . . . x . x end of 10 runs
Here is the function containing the tests:
def test_multi():
x, y, a = symbols('x y a')
syms = (x, y)
for eqs in (
[-3 + x + y + sqrt(x), -1 + x - y + sqrt(x)],
):
ans = solve(eqs, syms)
if type(ans) is dict:
s = [(ans[x], ans[y])]
try:
for eq in eqs:
for a in s:
reps = dict(zip(syms, a))
assert checksol(eq, reps)
print '.',
except AssertionError:
print 'x',
--
You received this message because you are subscribed to the Google Groups
"sympy" 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/sympy?hl=en.