Protest

Protest is a framework and toolset for writing and running Programmer Tests. There is currently an implementation for Python. At some point I'd like to write an implementation for Java and C# as well.

Why another test framework for Python?

I got frustrated with PyUnit and wanted a simple test framework that felt more "pythonic". So I whipped up just what I needed and built some useful tools around it.

What tools?

Apart from test runners that generate text or HTML reports, Protest includes a documentation generator that creates useful API documentation from well-written programmer tests that follow certain simple naming conventions. Protest generates documentation from the actual code of the programmer tests and from semi-structured docstrings in the test code, rather than from docstrings or comments in production code.

What about Pydoc, Doctest and Epydoc?

Pydoc and Epydoc generate documentation from docstrings in the code under test. Doctest interprets docstrings as tests. The advantages of Protest are:

Isn't this just like...?

Yes.

The Protest framework is directly inspired by JUnit and PyUnit. Protest adapts the design to be "pythonic", so that it's more convenient for me to use when I have my Python head on, and more flexible so that test suites can be loaded, composed and decorated in different ways.

The documentation tool is directly inspired by Testdox. Testdox is a bit bare-bones. I wanted a similar tool for Python that generated richer documentation of a similar quality to Javadoc.

How is Protest licensed?

Protest is licensed under the GPL.

Ok, I'm convinced! Where do I get Protest?

Protest is currently under heavy development. You can get the latest version by checking it out of the Subversion repository:

https://svn.sourceforge.net/svnroot/xspecs/protest-python/trunk/