What I want from a (unit)test module

Pythoneer

Saturday, September 10. 2005

What I want from a (unit)test module

or Deficits of pyUnit

I don't even know for sure if unittests is the perfect testing method in my case, but until now the methodology of it works fine for me, it's just those little things that sometimes bother me.

Here is what I am missing

  • run tests X times, we have timing issues and unless the tests didn't succeed a hundred times i don't trust them to always pass, I need e.g. a simple command line parameter "--repeat=100"
  • if i call assert*() inside a method multiple times it shall also be counted as that number of tests. E.g. i write the function test_x() and inside i have three times assert() calls, because i am too lazy to write 3 seperate functions, this shall also count three tests!

Yeah I realize now, that those are not big things, but I just started yesterday writing down what I miss, so this list might grow. I am sure there is someone out there who can help ... thanks

Posted by Wolfram in Programming at 12:03
Comments (3)
Trackbacks (0)

Trackbacks
Trackback specific URI for this entry

No Trackbacks

Comments
Display comments as (Linear | Threaded)

Although it does not currently do what you want, you still might want to look a py.test, part of the "py lib" (http://codespeak.net/py/). It is easy to modify nearly any part of py.test with configuration files that can totally change the behaviour. Plus it has lots of other nifty features.
#1 Carl Friedrich Bolz on 2005-09-10 13:39 (Reply)
Phillip Eby wrote about the extensibility of Python's unittest module here: http://dirtsimple.org/2005/08/ruby-gems-python-eggs-and-beauty-of.html It seems to me that you could create a custom TestRunner that does what you want for the first requirement. The second requirement could probably be accomplished with a subclass of TestCase that counts up calls to its assertion methods. Kevin
#2 Kevin Dangoor (Homepage) on 2005-09-10 15:32 (Reply)
In py.test you can create a generator which yields individual tests, which can be used to much the same effect as monitoring every assert.
#3 Ian Bicking (Homepage) on 2005-09-19 23:52 (Reply)

Add Comment


To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 

Calendar

Back May '12
Mon Tue Wed Thu Fri Sat Sun
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Quicksearch

Categories

  • XML JavaScript
  • XML Mac stuff
  • XML Miscellaneous
  • XML Missing or not found
  • XML Music
  • XML Private
  • XML Programming


All categories

Archives

  • May 2012
  • April 2012
  • March 2012
  • Recent...
  • Older...

supersized.org

Owner login

supersized s9y blog hosting
Free s9y blog!

Disclaimer

Syndicate This Blog

  • XML RSS 0.91 feed
  • XML RSS 1.0 feed
  • XML RSS 2.0 feed
  • ATOM/XML ATOM 0.3 feed
  • ATOM/XML ATOM 1.0 feed
  • XML RSS 2.0 Comments
The owner of supersized.org is not responsible for any content on this page!