Does anyone know of a @pytestdotorg plugin that cache's
- `random.getstate()`
- `numpy.random.get_state()`
so that, on failure, `--lf` runs under the same pRNG conditions? I can't find one, and that's a really easy bit of #python code to write.
-
-
Now that I think about this out loud though (sorry), my solution wouldn't work. If you do `--lf` and there are many stochastic functions, you don't capture the exact state for an individual test. Has to be function scoped.
-
That's a good point, did not thought about that.
- 2 more replies
New conversation -
-
-
Sure, anytime!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.