[TIP] repeating test case (loop)

James bjlockie at lockie.ca
Tue Oct 18 11:02:57 PDT 2016


This is what I want:


class TestAclass():
     # repeat following test 4 times
     for i in range(1,4):
         def test_1(self):
             pass


On 2016-10-18 10:19 AM, 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 
> <mailto: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
>     <mailto:testing-in-python at lists.idyll.org>
>     http://lists.idyll.org/listinfo/testing-in-python
>     <http://lists.idyll.org/listinfo/testing-in-python>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20161018/4a71d825/attachment.htm>


More information about the testing-in-python mailing list