On Sun, Jan 24, 2010 at 1:17 PM, Nicolas M. Thiery <nicolas.thi...@u-psud.fr> wrote: > On Thu, Jan 21, 2010 at 11:29:07AM -0800, mhampton wrote: >> On Jan 21, 1:03 pm, Robert Miller <r...@rlmiller.org> wrote: >> > 500s is too long for a doctest to take with "sage -t -long", >> > especially since on sage.math with a healthy number of threads, this >> > one doctest will take as long as the rest of the library: >> > >> > >> sage -t -long devel/sage-main/sage/rings/arith.py >> > >> [503.1 s] >> > >> > I'd say 90s for "sage -t" and maybe 200-300s for "sage -t -long" >> > should be the max. >> >> Well then perhaps we should have a -very_long flag! I would think >> that some very long doctests stress-test things in a way that may be >> impossible with shorter tests - large memory usage for example. > > Just a stupid idea: what about (allowing for) annotating the long > tests with an order of magnitude of the time taken by the command? > > sage: command # long time (60s) > > Then, > > sage -t -long 20s ... > > would skip all tests with a larger time annotation. The default would > be, say, 30s, and any longer test would be requested to be annotated. > This would leave much flexibility for the caller of sage -t, without > the need for introducing options -long -longlong -longlonglong ...) > > Besides, as a documentation reader, I would find such annotations > useful (even if this is partially meaningless since such timings > depend so much on the hardware). > > One issue though: how to handle tests which depend on long tests ...
The optional testing framework that is already in Sage would easily allow for everything you request above, and would also solve the problem in your last sentence. We could do sage: <some code> # optional -- long sage: <some code> # optional -- really_long sage: <some code> # optional -- really_really_long etc. Then use sage -t -only_optional=long or sage -t -only_optional=really_long etc. to run *only* the tests in the tree that are long, really_long, etc. When a test is selected to run, that whole function's doctest block is run. If a test depends on a long doctest, it must also be marked long, just like if it depends on some optional component. -- William -- 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