
If you want to see the declarative tests, here it is. https://github.com/construct/construct/blob/master/tests/test_all.py pozdrawiam, Arkadiusz Bulski 2016-09-08 2:13 GMT+02:00 Arek Bulski <arek.bulski@gmail.com>:

On Wed, Sep 7, 2016 at 8:14 PM, Arek Bulski <arek.bulski@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.

On Wed, Sep 7, 2016 at 9:12 PM, Alexander Belopolsky < alexander.belopolsky@gmail.com> wrote:
It may be instructive for you to see how this functionality is implemented in CPython's own test suit: https://github.com/python/cpython/blob/276f4ef97a434d4279a2d207daa34cafcf099...

On Wed, Sep 7, 2016 at 8:14 PM, Arek Bulski <arek.bulski@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.

On Wed, Sep 7, 2016 at 9:12 PM, Alexander Belopolsky < alexander.belopolsky@gmail.com> wrote:
It may be instructive for you to see how this functionality is implemented in CPython's own test suit: https://github.com/python/cpython/blob/276f4ef97a434d4279a2d207daa34cafcf099...
participants (2)
-
Alexander Belopolsky
-
Arek Bulski