15 Apr 2004 harald   » (Master)

Discovered the coverage.py module and put it in my small unittest testsuite for rhpl.conf.

The interesting code looks like this:

def suite():
    suite = unittest.TestSuite()
    suite = unittest.makeSuite(TestConf,'test')
    return suite

if __name__ == "__main__": import coverage coverage.erase() coverage.start() from rhpl import Conf testRunner = unittest.TextTestRunner(verbosity=2) result = testRunner.run(suite()) coverage.stop() coverage.the_coverage.report(Conf, show_missing=0 ) sys.exit(not result.wasSuccessful())

which outputs s.th. like this:

Ran 4 tests in 0.685s

OK Name Stmts Exec Cover ------------------------------- rhpl.Conf 1287 387 30%

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!