10 | | etcetera, the segfault vanished (of course!) but I didn't see all test appear in numerical order. I guess I was just blocking that because of the severe cognitive dissonance this was causing, but your remark now makes it unavoidable to acknowledge. Perhaps if we equip every test with a line |
| 10 | etcetera, the segfault vanished (of course!) but I didn't see all test appear in numerical order. I guess I was just blocking that because of the severe cognitive dissonance this was causing, but your remark now makes it unavoidable to acknowledge. |
| 11 | |
| 12 | Indeed, reading the generated `.py` file: |
| 13 | {{{ |
| 14 | ... |
| 15 | m = sys.modules[__name__] |
| 16 | ... |
| 17 | runner = sagedoctest.testmod_returning_runner(m, |
| 18 | ... |
| 19 | }}} |
| 20 | so the doctestrunner gets a hold of which doctests to run by getting passed the ''module'' `__main__`. At that point, it can basically only look up the runnable methods in the dictionary, so ordering is not guaranteed. It likely just extracts the doctests by the usual docstring introspecion tools. |
| 21 | |
| 22 | Perhaps if we equip every test with a line |