unittest: new reporting category "skipped"

Jeremy Fincher tweedgeezer at hotmail.com
Thu Sep 23 19:47:59 EDT 2004


Remy Blank <remy.blank_asps at pobox.com> wrote in message news:<mailman.3797.1095959172.5135.python-list at python.org>...
> Jeremy Fincher wrote:
> > Even if it doesn't get accepted into Python proper, I'll take a copy
> > and put it with my project -- I already provide my own unittest.py
> 
> I was wondering, is it worth modifying unittest.py directly and
> provide a patch, or should I just extend its functionality in a
> separate file, and provide that one?

I just modified it directly.  What format the Python people prefer for
their patches is their business :)
 
> > that I hacked to show the total number of asserts (I was curious one
> > day, and it's turned out to be a remarkably useful thing to have,
> > since my tests-upon-tests can hide unreaonable numbers of assertions
> > which otherwise would go unnoticed (except as a general slowness of
> > the test suite).
> 
> Interesting idea. What do you use the assertion count for?

Supybot has tests for its plugins, but since some plugins are rather
central to the bot, they're loaded during all the plugin tests.  When
I increased the number of these central plugins, I found that the
tests ran more slowly.  After adding the assertion count, I discovered
that each central plugin I added resulted in about 1,000 more
assertions.  What had happened was that during the tests for each
plugin, the tests for each central plugin were being re-run, resulting
in a significantly more time consuming test run.

Nowadays, I just use it as a general measure of how many tests we
have, and as a bragging point on our website :)

Jeremy



More information about the Python-list mailing list