This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eli.bendersky
Recipients belopolsky, eli.bendersky, terry.reedy
Date 2010-07-26.03:03:32
SpamBayes Score 0.0037991484
Marked as misclassified No
Message-id <1280113419.65.0.711984671263.issue9315@psf.upfronthosting.co.za>
In-reply-to
Content
Alexander,

1. Done
2. Done
3. Done. Made docstrings follow PEP 257, to the best of my understanding
4. Done. Attached patch is made on fresh SVN 2.7 branch, file renamed to test_trace.py and 'svn add' executed

5. I'm not sure I agree with you on this point. IMHO, it's taking the "whiteness" of testing a bit too far. I will explain:

The globaltrace and localtrace methods of Trace are quite thin, taking frame information and shoving it into an internal counts dict. To test them a lot of manual construction is required, which is very implementation dependent. In the future, Trace's implementation may be modified, and such tests will have to be completely re-coded as a result. 

At the moment, checking Trace via its 'runfunc' API allows 100% 
coverage on the relevant globaltrace and localtrace functions without getting into implementation details too deep. I think that given this there's no real point in getting deeper. Had I not been able to thoroughly examine their inner workings via runfunc, I would indeed consider getting deeper in the unit tests, but now I just don't really see the point.
History
Date User Action Args
2010-07-26 03:03:40eli.benderskysetrecipients: + eli.bendersky, terry.reedy, belopolsky
2010-07-26 03:03:39eli.benderskysetmessageid: <1280113419.65.0.711984671263.issue9315@psf.upfronthosting.co.za>
2010-07-26 03:03:36eli.benderskylinkissue9315 messages
2010-07-26 03:03:35eli.benderskycreate