[Python-ideas] Shuffled

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Sep 7 21:12:55 EDT 2016


On Wed, Sep 7, 2016 at 8:14 PM, Arek Bulski <arek.bulski at gmail.com> wrote:
>
> If you want to see the declarative tests, here it is.
> https://github.com/construct/construct/blob/master/tests/test_all.py


So, why can't you call random.shuffle(all_tests) if you want to run your
tests in random order?

If for some reason you prefer to stick shuffled in

for i, (func, args, res, exctype) in enumerate(tests):

I would say it is a bad idea because it is not clear whether you would want
enumerate(shuffled(tests)) or shuffled(enumerate(tests)) and what the
difference between the two constructs is.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160907/203aeb8e/attachment.html>


More information about the Python-ideas mailing list