Re: SymPy testsuite marks some tests as "slow"?
Barton Willis via Maxima-discuss <[email protected]> Sat, 16 May 2026 20:31:30 +0000
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <DM6PR07MB79487C8EB6D42BAC2556FCB3B6052@DM6PR07MB7948.namprd07.prod.outlook.com> |
Thanks for the information—much appreciated. --Barton ________________________________ From: Oscar Benjamin <[email protected]> Sent: Saturday, May 16, 2026 6:08 AM To: <[email protected]> <[email protected]> Subject: Re: [Maxima-discuss] SymPy testsuite marks some tests as "slow"? Caution: Non-NU Email On Fri, 15 May 2026 at 12:40, Barton Willis via Maxima-discuss <[email protected]> wrote: > > The SymPy Gruntz testsuite appears to have a mechanism for skipping slow tests (see lines 33 and 98, for example). There are other such designations as well, for example: > > test_grunts_eval_special_slow_sometimes_fail (line 137 — “grunts” looks like a typo) > test_gruntz_eval_special_fail (line 148) > test_gruntz_eval_special (line 110) > > What does “sometimes_fail” mean? Every third Tuesday? I don't know but I imagine that there was a bug that only appeared depending on something non-deterministic (for example set/dictionary iteration order in CPython). There is a good chance that the situation has changed since that test was written though since it comes from 15 years ago: https://urldefense.com/v3/__https://github.com/sympy/sympy/pull/757__;!!PvXuogZ4sRB2p-tU!Hwxd9_Nz0xjgR_8fhtTkaHHDbcHiL8R4ewbAboZV6DNUe85lGIIA_2P_1RHxjfMqjfl8SoOoEvrjwW6tiYhPdK7zgQ$ I just ran the test 20 times and it was fine each time but I don't know if the problem was something like it failed 1 time out of 100. > I’m not sure we want to complicate our own tests by optionally skipping tests and so on, but perhaps I lack imagination? The way that this is done in test_gruntz.py is not right since it means that the tests are skipped unconditionally. More broadly in SymPy though tests are divided into normal tests and slow tests and you can choose which to run when running the tests. This is needed because a small number of slow tests take the majority of the time. On this (old and slow) computer using only a single core it takes about 10 times longer to run the whole not-slow SymPy test suite than it does to run the entire Maxima test suite (I didn't time this now but ~20 minutes vs ~2 minutes from memory). > I noticed this because I was working on some known testsuite failures. My “improved” code increases the running time for: > (%i1) limit(exp(exp(exp(psi[0](psi[0](psi[0](x))))))/x, x, inf); > (%o1) 0 > > (%i2) time(%); > (%o2) [14.640625] > > from about 0.01 seconds to close to 15 seconds. I’m suspicious that current Maxima gets the correct value for this limit by “magic,” not logic. Tracing a few functions shows that this test almost behaves like an infinite loop — I suspect a near‑bug in my code. > In SymPy, this test (line 133) is marked as slow. How slow is it in SymPy? I just tried on this computer and I can say that it takes more than 2 minutes but I haven't waited for it to finish. -- Oscar _______________________________________________ Maxima-discuss mailing list [email protected] https://urldefense.com/v3/__https://lists.sourceforge.net/lists/listinfo/maxima-discuss__;!!PvXuogZ4sRB2p-tU!Hwxd9_Nz0xjgR_8fhtTkaHHDbcHiL8R4ewbAboZV6DNUe85lGIIA_2P_1RHxjfMqjfl8SoOoEvrjwW6tiYjktHVL3Q$ _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss