[TIP] repeating test case (loop)

James Cooke me at jamescooke.info
Tue Oct 18 07:29:21 PDT 2016


The DDT package provides a decorator to loop tests, but works to make
each looped test look like an individual test instance.
http://ddt.readthedocs.io/en/latest/example.html

However, as Tiago said, it's not clear what you're trying to achieve -
can you share code? You'll get better answers if you're able to share
what you're working on and your goals.

Cheers,

James



On Tue, 18 Oct 2016, at 03:19 PM, Tiago Ferraz wrote:
> Hypothesis does this. I think it is possible to create a decorator
> that could repeat the test method a defined number of times. But now,
> I am guessing this is not exactly what you are looking for. Could you
> share more details over your goal with this?
>
> -T
>
> On Tue, Oct 18, 2016 at 4:16 PM, James <bjlockie at lockie.ca> wrote:
>> Hi,
>>
>> Is it possible to loop over a test case and do it multiple times?
>>
>>
>> _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python
> _________________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

--
James Cooke Backend software developer CV PDF:
http://jamescooke.info/docs/james_cooke_cv.pdf Website:
http://jamescooke.info/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20161018/e86eac6e/attachment.htm>


More information about the testing-in-python mailing list