On Sat, Apr 18, 2009 at 2:00 PM, Rob Beezer <goo...@beezer.cotse.net> wrote: > > Hi Carl, > > Thanks for the explanation - good to know just why this was > happening. I'd noticed the tests being run in a different order as I > tried to debug this, but hadn't dug deep enough to discover the cause. > > In misc/latex.py how the latex is created often depends on the value > of the boolean EMBEDDED_MODE, typically wrapping the latex in HTML > tags, or not. So then it must be critical to assume a default value > of this switch and restore that state at the end of example that > exercises the alternate behavior. Maybe there are other places where > this situation could arise? > > Thinking as I write - a randomized order for tests might cause errors > like this to not occur during the review process, but then surface > spuriously during testing after releases? In the long-run it would > lead to more bullet-proof tests (long-term gain, better tests), but > maybe inject a confusing element of randomness in initial testing > (short-term pain, more heartburn for the release manager)? > > An alternative would be to name the examples with names like > "example_0006" so the alphabetical sorting is the same as the order of > the tests in the file. Just thoughts - I don't have enough experience > to say which makes more sense. > > Thanks again for explaining the mystery.
I posted a patch so that (1) doctests are ran in the same order as the file (2) doctests can be run in random order (3) doctests can be run in random order specified by a seed Carl, maybe you can referee it: http://trac.sagemath.org/sage_trac/ticket/5816 William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---