[TIP] Query on Testify

mani kandan majafriend at gmail.com
Mon Jun 24 13:32:14 PDT 2013


Hi Sean,

I am looking almost for the same stuff you are pointing on data driven. On
test rerunner, what I meant is if my test fails there are two options
1. retry quickly with a back off.
2. Retry all failed test case at end of test run.

A framework that supports both will be a real hit for me.

Thanks,
-Mani


On Mon, Jun 24, 2013 at 12:49 PM, Sean Fisk <sean at seanfisk.com> wrote:

> Hi Mani,
>
> I assume by data provider you are referring to data-driven testing<http://en.wikipedia.org/wiki/Data-driven_testing>.
> In pytest, the way I accomplish this is by using test parametrization,
> which is a fancy way of saying "running the same tests with different
> parameters." Using pytest, you can parametrize a fixture<http://pytest.org/latest/fixture.html?highlight=fixtures#parametrizing-a-fixture>,
> individual functions<http://pytest.org/latest/parametrize.html#pytest-mark-parametrize-parametrizing-test-functions>,
> or create your own parametrization scheme<http://pytest.org/latest/parametrize.html#basic-pytest-generate-tests-example>.
> Here is an example from a project on which I am working<https://github.com/seanfisk/rpython-stencil-language/blob/c1e869ac6153af14a85264f024967232a18a115c/tests/interpreter/test_stencil.py> where
> I use os.listdir() to get a directory listing, then run the same test for
> each file in the directory.
>
> Could you clarify what you mean by "test re-runner"?
>
> Hope this helps,
>
> - Sean
>
> On Mon, Jun 24, 2013 at 12:10 PM, mani kandan <majafriend at gmail.com>wrote:
>
>> Hi Julian,
>>
>> Yeah I went through it and found it quite interesting. Some of my
>> requirements are having a data provider and test rerunner. I came across
>> testify and read its document where it is specified that it is an
>> enhancement over unittest and nose. So I am trying to understand what it
>> provide and how easy is to use it. This will help me in making a correct
>> decision before starting on any test framework as it will be difficult to
>> switch once we started.
>>
>> Thanks,
>> -Mani
>>
>>
>> On Mon, Jun 24, 2013 at 11:05 AM, Julian Berman <julian at grayvines.com>wrote:
>>
>>> Hi.
>>>
>>> The standard library already has a testing framework (unittest) which is
>>> quite widely used and documented.
>>>
>>> Have you looked at it?
>>>
>>> Cheers
>>> Julian
>>> Hi all,
>>>
>>> I am newbie to python. Recently I came to know about the mailing list. I
>>> am in search of a good python test framework. While doing so, I cam across
>>> testify. The wiki provided in https://github.com/Yelp/Testify/wiki is
>>> very minimal. I am looking for some more examples and uses. Can anyone me
>>> point me on same.
>>>
>>> Thanks,
>>>      G.MANIKANDAN
>>>
>>> _______________________________________________
>>> testing-in-python mailing list
>>> testing-in-python at lists.idyll.org
>>> http://lists.idyll.org/listinfo/testing-in-python
>>>
>>>
>>
>>
>> --
>> ALWAYS KEEP SMILING
>>
>>  FOR U EVER,
>>
>>      G.MANIKANDAN
>>
>> _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python
>>
>>
>
>
> --
> Sean Fisk
>



-- 
ALWAYS KEEP SMILING

 FOR U EVER,

     G.MANIKANDAN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20130624/cdada833/attachment-0001.htm>


More information about the testing-in-python mailing list