Test-Driven Dev. (Kent Beck) Python Chapter Question

yaipa h. yaipa at yahoo.com
Thu Jun 26 02:46:52 EDT 2003


In Chapter 20. Cleaning Up After

When adding "tearDown()" to "TestCase" in xUnit, the TestCase method run()
suddenly takes on a new argument named "result."  In the next line result 
is used as "result.testStarted()."  Oddly, when TestCase.run() is called by
"TestCaseTest" it is called without an argument, so of course Python complains.
If I drop "result" from the argument list and strike the line
"result.testStarted()" everything works fine. I've looked and
there seems to be no code download page or errata available.

Anyone had similar problems with this chapter or am I reading over
something here?

Thanks,

   --Alan Haffner




More information about the Python-list mailing list