This is my first @pytestdotorg plugin. I just started using pytest two weeks ago after reading @brianokken's Python Testing with pytest (@pragprog).
https://pragprog.com/book/bopytest/python-testing-with-pytest …
-
-
Show this thread
-
Apparently, this pattern is common: https://twitter.com/jllorencetti/status/978077625833975808 …
This Tweet is unavailable.Show this thread -
In any case, I don't know pytest internals yet. I got a bit lucky and found a post by
@nicoddemus that lead me to a hook that could solve my problem right away. But, there's a lot in my (tiny!) implementation that smells to me. So, RFC. And, Please like and critique on github
Show this thread -
CC-ing CSS/ABM folks that I know because that was my itch:
@Aelkus@MrMeritology@JackieKazil@badnetworker@tozCSS@guerrero_oa@CWDillon@cheney@brentauble@reddy@ErnestoCarrella@chennacotlaShow this thread
End of conversation
New conversation -
-
-
I'm sure this will be valuable for many, but the right approach is to *never* rely on global RNG state. You should always be creating isolated random.Random() or np.random.RandomState() objects, which obviates the need for these save/restore state gymnastics.
-
That's nice in theory, but I find it rarely works in practice. Passing around instantiated RNGs becomes to tedious. E.G. How often do you see scipy.stats dists rvs() sampled with the optional rng param?
- 2 more replies
New conversation -
-
-
Congrats on the plugin!

-
Thanks for the course heading!
End of conversation
New conversation -
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.