[TIP] ANN: pinocchio 0.1, extensions for nose unit test framework
Titus Brown
titus at caltech.edu
Sun Mar 11 13:06:22 PDT 2007
On Sun, Mar 11, 2007 at 01:00:48PM -0700, Titus Brown wrote:
-> ANNOUNCING pinocchio v0.1.
[ ... ]
-> * spec -- generates "specification" output from test class/method names.
I'd just like to pimp Michal Kwiatkowski's spec plugin, which is really
cool. (In case he's too modest to do it himself... ;)
To quote,
-----
spec lets you generate a "specification" similar to testdox_ . The
spec plugin can generate simple documentation directly from class and
method names of test cases. For example, a test case like::
class TestFoobar:
def test_is_a_singleton(self):
pass
def test_can_be_automatically_documented(self):
pass
during the test run will generate the following specification: ::
Foobar
- is a singleton
- can be automatically documented
Test functions put directly into a module will have a context based
on the name of the containing module. For example, if you define
functions test_are_marked_as_deprecated() and
test_doesnt_work_with_sets() in a module test_containers.py,
you'll get the following specs::
Containers
- are marked as deprecated
- doesn't work with sets
Use cases
~~~~~~~~
If you follow a good naming convention for your tests you'll get free
up-to-date specification of your application - it will be as accurate
as your tests are.
More information about the testing-in-python
mailing list