[TIP] [ANN] simppu.py -- Simply Python Unit Testing

Mark Roddy markroddy at gmail.com
Tue Mar 16 19:23:05 PDT 2010


On Tue, Mar 16, 2010 at 10:00 PM, Alfredo Deza <alfredodeza at gmail.com> wrote:
>
>
> On Tue, Mar 16, 2010 at 9:47 PM, Pekka Klärck <peke at iki.fi> wrote:
>>
>> Hello,
>>
>> After using unittest for several years I've started to get slightly
>> bored with it. There are several annoyances, but my pet peeves are the
>> need to write boring boilerplate, the lack of test discovery, and the
>> PEP-8 incompatible. Because it seems unittest2 isn't going to fix too
>> many of these problems, and my actual needs for a unit testing tool
>> are fairly simple, I decided to see could I write a tool that actually
>> works the way I want.
>>
>> After few hours hacking, and 132 lines of Python, I have a pretty
>> promising prototype that:
>> - requires zero boilerplate (any function or method starting with
>> 'test_' in a file starting with 'test_' is a test),
>
> This will effectively break (or will not work) with (after browsing your
> source code):
> Test_
> TEST_
> Or any other combination of upper + lower case in test.
> Your test discovery should be able to resolve case insensitive naming... I
> think.
>
>>
>> - can find tests recursively from a directory,
>> - is naturally PEP-8 compatible, and
>> - can execute also old unittest based tests.
>>
>> The code and some example tests are available at
>> http://bitbucket.org/pekkaklarck/simppu/. Comments, questions, forks,
>> patches, etc. are highly appreciated!
>>
>> Cheers,
>>    .peke
>> --
>> Agile Tester/Developer/Consultant :: http://eliga.fi
>> Lead Developer of Robot Framework :: http://robotframework.org
>>
>> _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python
>
>
>
> --
> Alfredo Deza
>
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
>

Or you might want to concentrate on a tool for test authoring and
leverage another package for test discovery (though you might need to
write some extensions to it):
http://pypi.python.org/pypi/discover/0.3.2

-Mark



More information about the testing-in-python mailing list