[TIP] nosetrim plugin

Kumar McMillan kumar.mcmillan at gmail.com
Thu Mar 1 21:16:28 PST 2007


dear fellow test-hackers,

I had this idea for a nose plugin that suppresses duplicate errors of
the same type, so that when you break something very low level and the
same error propogates throughout your suite, you don't have to rerun
your tests (with --stop) just to get at the root of the problem.  To
and from work on the train the last few days I was able to whip this
up:

http://code.google.com/p/nosetrim/

let me know what you think!  it's a pretty simple idea.

now for some caveats:
- it doesn't work for doctests yet
- I'm currently replacing nose.result.TextTestResult with a subclass
of itself so I'd like to come up with a better way.  Jason - if you
get a chance to take a look at the code let's chat about some ideas
for new plugin hooks, or something that makes more sense.

and now for something else:

I came up with this little idea for testing plugins using a complete
subprocess of nosetests.  It's pretty generic so I wanted to point it
out in case you guys think it might be a good addition to the nose
module itself: http://nosetrim.googlecode.com/svn/trunk/test.py
(PluginTester).  It could be expanded more but right now I'm just
using it to run a match function on each output of the test suite,
which works nicely.

-Kumar



More information about the testing-in-python mailing list