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

Pekka Klärck peke at iki.fi
Tue Mar 16 18:47:17 PDT 2010


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),
- 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!

Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

More information about the testing-in-python mailing list