On 2020-06-22 20:41, 'Travis Scrimshaw' via sage-devel wrote: > > I agree with Nils about this, and I like his proposal. I also think the > random number might (and should) change if other doctests are changed > around it. However, having something that consistently fails is better than > something that does only part of the time. I have had doctests failing in a > file run as a standalone than within a folder due to a state being cached > in a separate file. There are also some transient errors that occur when > running the entire library tests. So having randomness in the doctests > makes it harder to detect if these are actual bugs or not (in my previous > example, it was not a bug in the code but in the doctest setup).
The choice isn't between something that fails consistently and something that fails randomly. Instead, the choice is between something that is broken but never fails, and something that is broken but fails randomly. Code that works is unaffected. The proposal on the ticket is to make things "as reproducible as possible" by choosing the seed at random, but displaying it when a test fails. So afterwards you could do e.g. $ sage -t --seed=8765309 foo.py and have it re-run the tests with the same numbers. That will produce consistent failures, and will let you know when you've fixed the bug. But more to the point, it will prevent us from committing broken code in the first place, which will obviate the need for any failures to be reproducible because there won't be any failures =) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/c23708c5-585a-a79f-6f6a-d08d95253796%40orlitzky.com.