Monday 16 April 2007

One of the things I like about JUnit 4 is to see anotations replace the naming convention required by earlier versions. I like the declarative approach so much, in fact, that I've extended pyunit (the standard python unit testing framework) with some simple hacks that yield the same syntax. By including the pyunit2.py module, you can now write your test methods like this: @test @expected_exception( NameError ) def a_simple_example_test( self ): #...etc The module's gone up on aspn for posterity. You'll find it here. 511475

No comments: