Redirecting unittest output to a Text widget

MrBlueSky penneys at bigfoot.com
Wed May 10 04:22:03 EDT 2006


Excellent, that seems to have done the trick!

FWIW: I should admit that I haven't really taken the time to properly
understand unittest... I'm too eager to get my tests written :-)
So for reasons I do not as yet understand Peter's suggestion above
didn't quite work for me but the following did....

   testSuite = unittest.makeSuite(testX)
   testSuite = unittest.makeSuite(testY)
   testRunner = unittest.TextTestRunner(stream=myTextWindow,
verbosity=2)
   testRunner.run(testSuite)

I'm only mentioning this in case it's relevant to others.

Thanks, Peter!




More information about the Python-list mailing list